You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
package com.iflytop.gd.app.cmd;
|
|
|
|
import com.iflytop.gd.app.core.BaseCommandHandler;
|
|
import com.iflytop.gd.app.model.dto.CmdDTO;
|
|
import com.iflytop.gd.app.service.DeviceCommandUtilService;
|
|
import com.iflytop.gd.app.service.SelfTestService;
|
|
import com.iflytop.gd.common.annotation.CommandMapping;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
/**
|
|
* 龙门架机械臂z轴回原点
|
|
*/
|
|
@Slf4j
|
|
@Component
|
|
@RequiredArgsConstructor
|
|
@CommandMapping("gantry_z_origin")//业务指令注解
|
|
public class GantryZOriginCommand extends BaseCommandHandler {
|
|
private final DeviceCommandUtilService deviceCommandUtilService;
|
|
private final SelfTestService selfTestService;
|
|
|
|
@Override
|
|
public CompletableFuture<Void> handle(CmdDTO cmdDTO) {
|
|
return runAsync(() -> {
|
|
deviceCommandUtilService.gantryZMoveOrigin(cmdDTO.getCommandId(), cmdDTO.getCommand());
|
|
selfTestService.getSelfTestState().setGantryZOrigin(true);//设置是否在原点状态
|
|
});
|
|
}
|
|
}
|
|
|