|
|
@ -30,7 +30,7 @@ import java.util.concurrent.CompletableFuture; |
|
|
|
@Slf4j |
|
|
|
public class FrontCmdController { |
|
|
|
private static final Set<String> NO_SELF_TEST_CMDS = |
|
|
|
new HashSet<>(Arrays.asList("device_self_test", "motor_x_to_home", "motor_y_to_home", "motor_z_to_home")); |
|
|
|
new HashSet<>(Arrays.asList("device_self_test", "motor_x_to_home", "motor_y_to_home", "motor_z_to_home","move_test")); |
|
|
|
private final CommandHandlerRegistry registry; |
|
|
|
private final WebSocketService webSocketService; |
|
|
|
private final DeviceStatus deviceStatus; |
|
|
@ -41,10 +41,10 @@ public class FrontCmdController { |
|
|
|
String cmdId = form.getCmdId(); |
|
|
|
String cmdCode = form.getCmdCode(); |
|
|
|
try { |
|
|
|
// if (!NO_SELF_TEST_CMDS.contains(cmdCode) && !deviceStatus.isSelfTestCompleted()) { |
|
|
|
// log.error("未进行自检,无法执行业务指令"); |
|
|
|
// return Result.failed("未进行自检,无法执行业务指令"); |
|
|
|
// } |
|
|
|
if (!NO_SELF_TEST_CMDS.contains(cmdCode) && !deviceStatus.isSelfTestCompleted()) { |
|
|
|
log.error("未进行自检,无法执行业务指令"); |
|
|
|
return Result.failed("未进行自检,无法执行业务指令"); |
|
|
|
} |
|
|
|
if (deviceStatus.isStopPressed()) { |
|
|
|
log.error("设备急停中"); |
|
|
|
return Result.failed("设备急停中"); |
|
|
|