|
|
@ -92,10 +92,6 @@ public class SprayTaskExecutor { |
|
|
|
DeviceCommand motorZPositionSetAboveSlideCommand = DeviceCommandGenerator.motorZPositionSet(height, 15.0); |
|
|
|
CommandFuture motorZPositionSetAboveSlideCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZPositionSetAboveSlideCommand); |
|
|
|
commandWait(motorXPositionSetCommandFuture, motorYPositionSetCommandFuture, motorZPositionSetAboveSlideCommandFuture); |
|
|
|
|
|
|
|
DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTask.getSprayParams().getVolume());//推动移动注射泵 |
|
|
|
CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand); |
|
|
|
commandWait(syringePumpForwardCommandFuture); |
|
|
|
} |
|
|
|
Thread.sleep(100); |
|
|
|
sprayTask.setSuspendable(true);//可以暂停,单次喷涂范围内可以进行暂停 |
|
|
@ -103,7 +99,6 @@ public class SprayTaskExecutor { |
|
|
|
double cacheXPoint = -1; |
|
|
|
double cacheYPoint = -1; |
|
|
|
DecimalFormat df = new DecimalFormat("#.##"); |
|
|
|
|
|
|
|
for (int i = 0; i < sprayTaskStep.getSpraySteps().size(); i++) {//单次喷涂 |
|
|
|
if (currentIndex != sprayTaskStep.getIndex()) { |
|
|
|
sprayNum = 0; |
|
|
@ -113,7 +108,12 @@ public class SprayTaskExecutor { |
|
|
|
currentStep++; |
|
|
|
continue; |
|
|
|
} |
|
|
|
sprayTask.setFirstImmobility(false); |
|
|
|
if(i == 1){ |
|
|
|
DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTask.getSprayParams().getVolume());//推动移动注射泵 |
|
|
|
CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand); |
|
|
|
commandWait(syringePumpForwardCommandFuture); |
|
|
|
} |
|
|
|
sprayTask.setFirstImmobility(true); |
|
|
|
List<DeviceCommand> sprayStepCommands = sprayTaskStep.getSpraySteps().get(i); |
|
|
|
DeviceCommand xSprayStepCommands = sprayStepCommands.get(0); |
|
|
|
xSprayStepCommands.getParam().put("speed", sprayTask.getSprayParams().getMovingSpeed());//防止修改了移动速度这里重新设置移动速度 |
|
|
|