Browse Source

自检增加上料区传感器的判断

master
王梦远 2 months ago
parent
commit
2ab1545316
  1. 6
      src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java

6
src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java

@ -55,7 +55,6 @@ public class MoveTestCommand extends BaseCommandHandler {
Double solutionModuleMotorDownInTubeExtPositon = devicePositionService.getPosition(DevicePositionCode.solutionModuleMotorDownInTubeExtPositon).getPositon();//加液模块电机下降进入试管抽取位置
Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液时托盘位置点
Point3D feedAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.feedAreaTrayPoint).getPoint3D();//获取上料区托盘夹爪位置点
deviceStateService.getCommandMutexState().get().setMoveTest(true);
return runAsync(() -> {
try {
@ -64,6 +63,11 @@ public class MoveTestCommand extends BaseCommandHandler {
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(cmdDTO.getCommandId(), cmdDTO.getCommand(), "机械臂夹爪存在试管架,请取出!", 0, "error"));
throw new AppException(ResultCode.TRANSFER_MODULE_YES_TRAY);//夹爪存在托盘
}
boolean feedTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST);
if (feedTrayExist) {
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(cmdDTO.getCommandId(), cmdDTO.getCommand(), "上料区存在试管架,请取出!", 0, "error"));
throw new AppException(ResultCode.FEED_AREA_EXIST_TRAY);//上料区存在托盘
}
deviceSensorService.collectSensorState();//收集传感器转态
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(cmdDTO.getCommandId(), cmdDTO.getCommand(), "1、各项传感器正常", 25, "success"));
solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液机械臂抬升至最高

Loading…
Cancel
Save