Browse Source

fix:修复暂停时阀门状态不正确的问题

master
白凤吉 3 weeks ago
parent
commit
6353ac6ee5
  1. 4
      src/main/java/com/qyft/ms/app/device/spray/SprayTaskExecutor.java

4
src/main/java/com/qyft/ms/app/device/spray/SprayTaskExecutor.java

@ -114,6 +114,7 @@ public class SprayTaskExecutor {
DeviceCommand threeWayValveOpenSyringePipelineCommand = DeviceCommandGenerator.threeWayValveOpenNozzlePipeline();//三通阀切换到注射器管路 DeviceCommand threeWayValveOpenSyringePipelineCommand = DeviceCommandGenerator.threeWayValveOpenNozzlePipeline();//三通阀切换到注射器管路
CommandFuture threeWayValveOpenSyringePipelineCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), threeWayValveOpenSyringePipelineCommand); CommandFuture threeWayValveOpenSyringePipelineCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), threeWayValveOpenSyringePipelineCommand);
commandWait(threeWayValveOpenSyringePipelineCommandFuture);
delay(500); delay(500);
//判断是否有暂停的点位如果有则还原暂停时的点位 //判断是否有暂停的点位如果有则还原暂停时的点位
@ -142,11 +143,12 @@ public class SprayTaskExecutor {
DeviceCommand nozzleValveOpenCommand = DeviceCommandGenerator.nozzleValveOpen();//开启喷嘴阀 DeviceCommand nozzleValveOpenCommand = DeviceCommandGenerator.nozzleValveOpen();//开启喷嘴阀
CommandFuture nozzleValveOpenCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveOpenCommand); CommandFuture nozzleValveOpenCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveOpenCommand);
commandWait(threeWayValveOpenSyringePipelineCommandFuture, nozzleValveOpenCommandFuture);
commandWait(nozzleValveOpenCommandFuture);
DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTimes.getVolume());//推动移动注射泵 DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTimes.getVolume());//推动移动注射泵
CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand); CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand);
commandWait(syringePumpForwardCommandFuture); commandWait(syringePumpForwardCommandFuture);
for (int i = 0; i < sprayTaskStep.getSprayPathPointList().size(); i++) {//循环路线 for (int i = 0; i < sprayTaskStep.getSprayPathPointList().size(); i++) {//循环路线
if (currentStep < sprayTask.getCurrentStep()) { if (currentStep < sprayTask.getCurrentStep()) {
currentStep++; currentStep++;

Loading…
Cancel
Save