|
|
@ -119,7 +119,7 @@ public class SprayTaskExecutor { |
|
|
|
// commandWait(motorXSpeedSetCmdToDeviceCommandFuture, motorYSpeedSetCmdToDeviceCommandFuture, motorZSpeedSetCmdToDeviceCommandFuture); |
|
|
|
//先移动到玻片位置 |
|
|
|
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(slideArr[sprayTaskStep.getIndex()][0],20.0); |
|
|
|
DeviceCommand motorYPositionSetCommand = DeviceCommandGenerator.motorYPositionSet(slideArr[sprayTaskStep.getIndex()][1],20.0); |
|
|
|
DeviceCommand motorYPositionSetCommand = DeviceCommandGenerator.motorYPositionSet(75.5 - slideArr[sprayTaskStep.getIndex()][1],20.0); |
|
|
|
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorXPositionSetCommand); |
|
|
|
CommandFuture motorYPositionSetCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYPositionSetCommand); |
|
|
|
|
|
|
@ -156,19 +156,16 @@ public class SprayTaskExecutor { |
|
|
|
List<CommandFuture> commandFutureList = new ArrayList<>(); |
|
|
|
double aXPoint = (double) sprayStepCommands.get(0).getParam().get("position"); |
|
|
|
double aYPoint = (double) sprayStepCommands.get(1).getParam().get("position"); |
|
|
|
for (DeviceCommand sprayStep : sprayStepCommands) { |
|
|
|
if(cacheXPoint != aXPoint){ |
|
|
|
CommandFuture commandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), sprayStep); |
|
|
|
commandFutureList.add(commandFuture); |
|
|
|
cacheXPoint = aXPoint; |
|
|
|
} |
|
|
|
if(cacheYPoint != aYPoint){ |
|
|
|
CommandFuture commandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), sprayStep); |
|
|
|
commandFutureList.add(commandFuture); |
|
|
|
cacheYPoint = aYPoint; |
|
|
|
} |
|
|
|
if(cacheXPoint != aXPoint){ |
|
|
|
CommandFuture commandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), sprayStepCommands.get(0)); |
|
|
|
commandFutureList.add(commandFuture); |
|
|
|
cacheXPoint = aXPoint; |
|
|
|
} |
|
|
|
if(cacheYPoint != aYPoint){ |
|
|
|
CommandFuture commandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), sprayStepCommands.get(1)); |
|
|
|
commandFutureList.add(commandFuture); |
|
|
|
cacheYPoint = aYPoint; |
|
|
|
} |
|
|
|
|
|
|
|
CommandFuture[] commandFutureArray = commandFutureList.toArray(new CommandFuture[0]); |
|
|
|
Point2D currentPoint; |
|
|
|
Point2D nextPoint = null; |
|
|
|