|
@ -2,10 +2,12 @@ |
|
|
// |
|
|
// |
|
|
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
//import com.qyft.ms.app.common.constant.WebSocketMessageType; |
|
|
//import com.qyft.ms.app.common.constant.WebSocketMessageType; |
|
|
//import com.qyft.ms.app.common.generator.PathGenerator; |
|
|
|
|
|
//import com.qyft.ms.app.device.status.DeviceStatus; |
|
|
//import com.qyft.ms.app.device.status.DeviceStatus; |
|
|
//import com.qyft.ms.app.device.status.SprayTask; |
|
|
//import com.qyft.ms.app.device.status.SprayTask; |
|
|
//import com.qyft.ms.app.model.bo.*; |
|
|
|
|
|
|
|
|
//import com.qyft.ms.app.model.bo.Point2D; |
|
|
|
|
|
//import com.qyft.ms.app.model.bo.SprayTaskPointCollectorPushBO; |
|
|
|
|
|
//import com.qyft.ms.app.model.bo.SprayTaskSprayed; |
|
|
|
|
|
//import com.qyft.ms.app.model.bo.SprayTaskStep; |
|
|
//import com.qyft.ms.app.model.entity.Position; |
|
|
//import com.qyft.ms.app.model.entity.Position; |
|
|
//import com.qyft.ms.app.model.entity.SysSettings; |
|
|
//import com.qyft.ms.app.model.entity.SysSettings; |
|
|
//import com.qyft.ms.app.service.PositionService; |
|
|
//import com.qyft.ms.app.service.PositionService; |
|
@ -27,14 +29,13 @@ |
|
|
//import java.util.Arrays; |
|
|
//import java.util.Arrays; |
|
|
//import java.util.List; |
|
|
//import java.util.List; |
|
|
//import java.util.concurrent.CompletableFuture; |
|
|
//import java.util.concurrent.CompletableFuture; |
|
|
//import java.util.concurrent.CopyOnWriteArrayList; |
|
|
|
|
|
//import java.util.concurrent.ExecutionException; |
|
|
//import java.util.concurrent.ExecutionException; |
|
|
//import java.util.concurrent.TimeUnit; |
|
|
//import java.util.concurrent.TimeUnit; |
|
|
// |
|
|
// |
|
|
//@Slf4j |
|
|
//@Slf4j |
|
|
//@Component |
|
|
//@Component |
|
|
//@RequiredArgsConstructor |
|
|
//@RequiredArgsConstructor |
|
|
//public class SprayTaskExecutor_bak { |
|
|
|
|
|
|
|
|
//public class SprayTaskExecutor { |
|
|
// private final WebSocketService webSocketService; |
|
|
// private final WebSocketService webSocketService; |
|
|
// private final DeviceCommandService deviceCommandService; |
|
|
// private final DeviceCommandService deviceCommandService; |
|
|
// private final SysSettingsService sysSettingsService; |
|
|
// private final SysSettingsService sysSettingsService; |
|
@ -71,6 +72,7 @@ |
|
|
// |
|
|
// |
|
|
// taskThread = new Thread(() -> { |
|
|
// taskThread = new Thread(() -> { |
|
|
// try { |
|
|
// try { |
|
|
|
|
|
// webSocketService.pushCMDResponseMsg(FrontResponseGenerator.generateJson(sprayTask.getCmdId(), sprayTask.getCmdCode(), CommandStatus.START, "喷涂任务开始执行")); |
|
|
// int reCurrentStep = sprayTask.getCurrentStep(); |
|
|
// int reCurrentStep = sprayTask.getCurrentStep(); |
|
|
// int currentStep = 0; //当前喷涂步骤 |
|
|
// int currentStep = 0; //当前喷涂步骤 |
|
|
// int sprayCount = 0; |
|
|
// int sprayCount = 0; |
|
@ -81,6 +83,8 @@ |
|
|
// //先移动到玻片位置 |
|
|
// //先移动到玻片位置 |
|
|
// DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(slideArr[sprayTaskStep.getIndex()][0], 20.0); |
|
|
// DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(slideArr[sprayTaskStep.getIndex()][0], 20.0); |
|
|
// DeviceCommand motorYPositionSetCommand = DeviceCommandGenerator.motorYPositionSet(75.5 - 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); |
|
|
// CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorXPositionSetCommand); |
|
|
// CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorXPositionSetCommand); |
|
|
// CommandFuture motorYPositionSetCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYPositionSetCommand); |
|
|
// CommandFuture motorYPositionSetCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYPositionSetCommand); |
|
|
// |
|
|
// |
|
@ -88,6 +92,7 @@ |
|
|
// Double slideHeight = Double.parseDouble(slideHeightSysSettings.getValue()); |
|
|
// Double slideHeight = Double.parseDouble(slideHeightSysSettings.getValue()); |
|
|
// Double height = slideHeight - sprayTask.getSprayParams().getMotorZHeight();//下降z轴高度 |
|
|
// Double height = slideHeight - sprayTask.getSprayParams().getMotorZHeight();//下降z轴高度 |
|
|
// DeviceCommand motorZPositionSetAboveSlideCommand = DeviceCommandGenerator.motorZPositionSet(height, 15.0); |
|
|
// DeviceCommand motorZPositionSetAboveSlideCommand = DeviceCommandGenerator.motorZPositionSet(height, 15.0); |
|
|
|
|
|
// CommandFuture motorZPositionSetAboveSlideCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZPositionSetAboveSlideCommand); |
|
|
// CommandFuture motorZPositionSetAboveSlideCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZPositionSetAboveSlideCommand); |
|
|
// CommandFuture motorZPositionSetAboveSlideCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZPositionSetAboveSlideCommand); |
|
|
// commandWait(motorXPositionSetCommandFuture, motorYPositionSetCommandFuture, motorZPositionSetAboveSlideCommandFuture); |
|
|
// commandWait(motorXPositionSetCommandFuture, motorYPositionSetCommandFuture, motorZPositionSetAboveSlideCommandFuture); |
|
|
// } |
|
|
// } |
|
@ -97,7 +102,7 @@ |
|
|
// double cacheXPoint = -1; |
|
|
// double cacheXPoint = -1; |
|
|
// double cacheYPoint = -1; |
|
|
// double cacheYPoint = -1; |
|
|
// DecimalFormat df = new DecimalFormat("#.##"); |
|
|
// DecimalFormat df = new DecimalFormat("#.##"); |
|
|
// for (int i = 0; i < sprayTaskStep.getSprayPathPointList().size(); i++) {//单次喷涂 |
|
|
|
|
|
|
|
|
// for (int i = 0; i < sprayTaskStep.getSpraySteps().size(); i++) {//单次喷涂 |
|
|
// if (currentIndex != sprayTaskStep.getIndex()) { |
|
|
// if (currentIndex != sprayTaskStep.getIndex()) { |
|
|
// sprayNum = 0; |
|
|
// sprayNum = 0; |
|
|
// currentIndex = sprayTaskStep.getIndex(); |
|
|
// currentIndex = sprayTaskStep.getIndex(); |
|
@ -106,13 +111,14 @@ |
|
|
// currentStep++; |
|
|
// currentStep++; |
|
|
// continue; |
|
|
// continue; |
|
|
// } |
|
|
// } |
|
|
// if (i == 1) { |
|
|
|
|
|
|
|
|
// if(i == 1){ |
|
|
// DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTask.getSprayParams().getVolume());//推动移动注射泵 |
|
|
// DeviceCommand syringePumpForwardCommand = DeviceCommandGenerator.syringePumpForward(sprayTask.getSprayParams().getVolume());//推动移动注射泵 |
|
|
|
|
|
// CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand); |
|
|
// CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand); |
|
|
// CommandFuture syringePumpForwardCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpForwardCommand); |
|
|
// commandWait(syringePumpForwardCommandFuture); |
|
|
// commandWait(syringePumpForwardCommandFuture); |
|
|
// } |
|
|
// } |
|
|
// sprayTask.setFirstImmobility(true); |
|
|
// sprayTask.setFirstImmobility(true); |
|
|
// List<DeviceCommand> sprayStepCommands = sprayTaskStep.getSprayPathPointList().get(i); |
|
|
|
|
|
|
|
|
// List<DeviceCommand> sprayStepCommands = sprayTaskStep.getSpraySteps().get(i); |
|
|
// DeviceCommand xSprayStepCommands = sprayStepCommands.get(0); |
|
|
// DeviceCommand xSprayStepCommands = sprayStepCommands.get(0); |
|
|
// xSprayStepCommands.getParam().put("speed", sprayTask.getSprayParams().getMovingSpeed());//防止修改了移动速度这里重新设置移动速度 |
|
|
// xSprayStepCommands.getParam().put("speed", sprayTask.getSprayParams().getMovingSpeed());//防止修改了移动速度这里重新设置移动速度 |
|
|
// DeviceCommand ySprayStepCommands = sprayStepCommands.get(1); |
|
|
// DeviceCommand ySprayStepCommands = sprayStepCommands.get(1); |
|
@ -125,11 +131,13 @@ |
|
|
// ySprayStepCommands.getParam().put("position", Double.parseDouble(df.format(aYPoint))); |
|
|
// ySprayStepCommands.getParam().put("position", Double.parseDouble(df.format(aYPoint))); |
|
|
// |
|
|
// |
|
|
// if (cacheXPoint != aXPoint) { |
|
|
// if (cacheXPoint != aXPoint) { |
|
|
|
|
|
// CommandFuture commandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), xSprayStepCommands); |
|
|
// CommandFuture commandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), xSprayStepCommands); |
|
|
// CommandFuture commandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), xSprayStepCommands); |
|
|
// commandFutureList.add(commandFuture); |
|
|
// commandFutureList.add(commandFuture); |
|
|
// cacheXPoint = aXPoint; |
|
|
// cacheXPoint = aXPoint; |
|
|
// } |
|
|
// } |
|
|
// if (cacheYPoint != aYPoint) { |
|
|
// if (cacheYPoint != aYPoint) { |
|
|
|
|
|
// CommandFuture commandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), ySprayStepCommands); |
|
|
// CommandFuture commandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), ySprayStepCommands); |
|
|
// CommandFuture commandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), ySprayStepCommands); |
|
|
// commandFutureList.add(commandFuture); |
|
|
// commandFutureList.add(commandFuture); |
|
|
// cacheYPoint = aYPoint; |
|
|
// cacheYPoint = aYPoint; |
|
@ -158,6 +166,7 @@ |
|
|
// deviceStatus.setSuspendable(false); |
|
|
// deviceStatus.setSuspendable(false); |
|
|
// if (currentStep >= reCurrentStep) { |
|
|
// if (currentStep >= reCurrentStep) { |
|
|
// DeviceCommand syringePumpStopCommand = DeviceCommandGenerator.syringePumpStop();//停止推动注射泵 |
|
|
// DeviceCommand syringePumpStopCommand = DeviceCommandGenerator.syringePumpStop();//停止推动注射泵 |
|
|
|
|
|
// CommandFuture syringePumpStopCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpStopCommand); |
|
|
// CommandFuture syringePumpStopCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpStopCommand); |
|
|
// CommandFuture syringePumpStopCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), syringePumpStopCommand); |
|
|
// commandWait(syringePumpStopCommandFuture); |
|
|
// commandWait(syringePumpStopCommandFuture); |
|
|
// } |
|
|
// } |
|
@ -166,10 +175,12 @@ |
|
|
// } |
|
|
// } |
|
|
// |
|
|
// |
|
|
// DeviceCommand highVoltageCloseCommand = DeviceCommandGenerator.highVoltageClose();//关闭高压 |
|
|
// DeviceCommand highVoltageCloseCommand = DeviceCommandGenerator.highVoltageClose();//关闭高压 |
|
|
|
|
|
// CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
// CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
// CommandFuture highVoltageCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), highVoltageCloseCommand); |
|
|
// commandWait(highVoltageCloseCommandFuture); |
|
|
// commandWait(highVoltageCloseCommandFuture); |
|
|
// Thread.sleep(500); |
|
|
// Thread.sleep(500); |
|
|
// DeviceCommand nozzleValveCloseCommand = DeviceCommandGenerator.nozzleValveClose();//关闭喷嘴阀 |
|
|
// DeviceCommand nozzleValveCloseCommand = DeviceCommandGenerator.nozzleValveClose();//关闭喷嘴阀 |
|
|
|
|
|
// CommandFuture nozzleValveCloseCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveCloseCommand); |
|
|
// CommandFuture nozzleValveCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveCloseCommand); |
|
|
// CommandFuture nozzleValveCloseCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), nozzleValveCloseCommand); |
|
|
// commandWait(nozzleValveCloseCommandFuture); |
|
|
// commandWait(nozzleValveCloseCommandFuture); |
|
|
// |
|
|
// |
|
@ -177,6 +188,9 @@ |
|
|
// DeviceCommand motorXOriginCommand = DeviceCommandGenerator.motorXOrigin(); |
|
|
// DeviceCommand motorXOriginCommand = DeviceCommandGenerator.motorXOrigin(); |
|
|
// DeviceCommand motorYOriginCommand = DeviceCommandGenerator.motorYOrigin(); |
|
|
// DeviceCommand motorYOriginCommand = DeviceCommandGenerator.motorYOrigin(); |
|
|
// DeviceCommand motorZOriginCommand = DeviceCommandGenerator.motorZOrigin(); |
|
|
// DeviceCommand motorZOriginCommand = DeviceCommandGenerator.motorZOrigin(); |
|
|
|
|
|
// CommandFuture motorXOriginCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorXOriginCommand); |
|
|
|
|
|
// CommandFuture motorYOriginCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYOriginCommand); |
|
|
|
|
|
// CommandFuture motorZOriginCommandFuture = deviceCommandService.sendCommand(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZOriginCommand); |
|
|
// CommandFuture motorXOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorXOriginCommand); |
|
|
// CommandFuture motorXOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorXOriginCommand); |
|
|
// CommandFuture motorYOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYOriginCommand); |
|
|
// CommandFuture motorYOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorYOriginCommand); |
|
|
// CommandFuture motorZOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZOriginCommand); |
|
|
// CommandFuture motorZOriginCommandFuture = deviceCommandService.sendCommandSprayTask(sprayTask.getCmdId(), sprayTask.getCmdCode(), motorZOriginCommand); |
|
@ -214,6 +228,9 @@ |
|
|
// |
|
|
// |
|
|
// /** |
|
|
// /** |
|
|
// * 停止任务线程: |
|
|
// * 停止任务线程: |
|
|
|
|
|
// * 1. 直接中断线程,不再关心 CompletableFuture 的等待和结果; |
|
|
|
|
|
// * 2. 可选择等待一定时间让线程自行退出(如 join 超时 2 秒); |
|
|
|
|
|
// * 3. 清空线程引用,防止内存泄露。 |
|
|
// */ |
|
|
// */ |
|
|
// public synchronized void stopTask() { |
|
|
// public synchronized void stopTask() { |
|
|
// if (taskThread != null && taskThread.isAlive()) { |
|
|
// if (taskThread != null && taskThread.isAlive()) { |
|
@ -231,70 +248,5 @@ |
|
|
// .orTimeout(120, TimeUnit.SECONDS) |
|
|
// .orTimeout(120, TimeUnit.SECONDS) |
|
|
// .get(); |
|
|
// .get(); |
|
|
// } |
|
|
// } |
|
|
// |
|
|
|
|
|
// |
|
|
|
|
|
// private List<SprayTaskStep> getSprayPath(Integer index, SprayTimes sprayTimes) { |
|
|
|
|
|
// String matrixPathType = sprayTimes.getMatrixPathType(); |
|
|
|
|
|
// Position slidePosition1 = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "slide_position1")); |
|
|
|
|
|
// Position slidePosition2 = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "slide_position2")); |
|
|
|
|
|
// Position slidePosition3 = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "slide_position3")); |
|
|
|
|
|
// Position slidePosition4 = positionService.getOne(new LambdaQueryWrapper<Position>().eq(Position::getPointCode, "slide_position4")); |
|
|
|
|
|
// Double[][] slideArr = { |
|
|
|
|
|
// {slidePosition1.getX(), slidePosition1.getY()}, |
|
|
|
|
|
// {slidePosition2.getX(), slidePosition2.getY()}, |
|
|
|
|
|
// {slidePosition3.getX(), slidePosition3.getY()}, |
|
|
|
|
|
// {slidePosition4.getX(), slidePosition4.getY()} |
|
|
|
|
|
// }; |
|
|
|
|
|
// Double[] upperLeft = {sprayTimes.getX1(), sprayTimes.getY1()}; //范围左上角 x1,y1 |
|
|
|
|
|
// Double[] lowerRight = {sprayTimes.getX2(), sprayTimes.getY2()}; //范围左上角 x1,y1 |
|
|
|
|
|
// Double[] slide = slideArr[index];//获取玻片的坐标 |
|
|
|
|
|
// DecimalFormat df = new DecimalFormat("#.##"); |
|
|
|
|
|
// double left = Double.parseDouble(df.format(slide[0] + upperLeft[0])); |
|
|
|
|
|
// double right = Double.parseDouble(df.format(slide[0] + lowerRight[0])); |
|
|
|
|
|
// double top = Double.parseDouble(df.format(slide[1] + upperLeft[1])); |
|
|
|
|
|
// double bottom = Double.parseDouble(df.format(slide[1] + lowerRight[1])); |
|
|
|
|
|
// Double spacing = sprayTimes.getSpacing(); |
|
|
|
|
|
// List<SprayTaskStep> sprayTaskStepList = new CopyOnWriteArrayList<>(); |
|
|
|
|
|
// if ("horizontal".equals(matrixPathType)) {//喷涂路径类型 horizontal 横向 | vertical 纵向 | grid 网格先横向后纵向 |
|
|
|
|
|
// List<Point2D> pathList = PathGenerator.generatePathPoints( |
|
|
|
|
|
// left, right, top, bottom, |
|
|
|
|
|
// spacing, |
|
|
|
|
|
// PathGenerator.MoveMode.HORIZONTAL_ZIGZAG_TOP_DOWN |
|
|
|
|
|
// ); |
|
|
|
|
|
// SprayTaskStep sprayTaskStep = new SprayTaskStep(); |
|
|
|
|
|
// sprayTaskStep.setIndex(index); |
|
|
|
|
|
// sprayTaskStep.setSprayPathPointList(pathList); |
|
|
|
|
|
// sprayTaskStepList.add(sprayTaskStep); |
|
|
|
|
|
// } else if ("vertical".equals(matrixPathType)) { |
|
|
|
|
|
// List<Point2D> pathList = PathGenerator.generatePathPoints( |
|
|
|
|
|
// left, right, top, bottom, |
|
|
|
|
|
// spacing, |
|
|
|
|
|
// PathGenerator.MoveMode.VERTICAL_ZIGZAG_LEFT_RIGHT |
|
|
|
|
|
// ); |
|
|
|
|
|
// SprayTaskStep sprayTaskStep = new SprayTaskStep(); |
|
|
|
|
|
// sprayTaskStep.setIndex(index); |
|
|
|
|
|
// sprayTaskStep.setSprayPathPointList(pathList); |
|
|
|
|
|
// sprayTaskStepList.add(sprayTaskStep); |
|
|
|
|
|
// } else if ("grid".equals(matrixPathType)) { |
|
|
|
|
|
// List<Point2D> pathList1 = PathGenerator.generatePathPoints( |
|
|
|
|
|
// left, right, top, bottom, |
|
|
|
|
|
// spacing, |
|
|
|
|
|
// PathGenerator.MoveMode.HORIZONTAL_ZIGZAG_TOP_DOWN |
|
|
|
|
|
// ); |
|
|
|
|
|
// SprayTaskStep sprayTaskStep1 = new SprayTaskStep(); |
|
|
|
|
|
// sprayTaskStep1.setIndex(index); |
|
|
|
|
|
// sprayTaskStep1.setSprayPathPointList(pathList1); |
|
|
|
|
|
// sprayTaskStepList.add(sprayTaskStep1); |
|
|
|
|
|
// List<Point2D> pathList2 = PathGenerator.generatePathPoints( |
|
|
|
|
|
// left, right, top, bottom, |
|
|
|
|
|
// spacing, |
|
|
|
|
|
// PathGenerator.MoveMode.VERTICAL_ZIGZAG_LEFT_RIGHT |
|
|
|
|
|
// ); |
|
|
|
|
|
// SprayTaskStep sprayTaskStep2 = new SprayTaskStep(); |
|
|
|
|
|
// sprayTaskStep2.setIndex(index); |
|
|
|
|
|
// sprayTaskStep2.setSprayPathPointList(pathList2); |
|
|
|
|
|
// sprayTaskStepList.add(sprayTaskStep2); |
|
|
|
|
|
// } |
|
|
|
|
|
// return sprayTaskStepList; |
|
|
|
|
|
// } |
|
|
|
|
|
//} |
|
|
//} |
|
|
|
|
|
// |