Browse Source

fix:调整自检运动速度

master
白凤吉 3 weeks ago
parent
commit
f40f1d1e75
  1. 12
      src/main/java/com/qyft/ms/app/front/cmd/business/MoveTestCommand.java

12
src/main/java/com/qyft/ms/app/front/cmd/test/MoveTestCommand.java → src/main/java/com/qyft/ms/app/front/cmd/business/MoveTestCommand.java

@ -1,4 +1,4 @@
package com.qyft.ms.app.front.cmd.test;
package com.qyft.ms.app.front.cmd.business;
import com.qyft.ms.app.core.SelfMoveTestGenerator; import com.qyft.ms.app.core.SelfMoveTestGenerator;
import com.qyft.ms.app.device.status.DeviceStatus; import com.qyft.ms.app.device.status.DeviceStatus;
@ -34,7 +34,7 @@ public class MoveTestCommand extends BaseCommandHandler {
try { try {
//deviceSensorService.collectSensorState();//收集传感器转态 //deviceSensorService.collectSensorState();//收集传感器转态
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "1、各项传感器正常", 25, "success")); webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "1、各项传感器正常", 25, "success"));
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(200.0); //移动到200mm处
DeviceCommand motorXPositionSetCommand = DeviceCommandGenerator.motorXPositionSet(200.0, 20.0); //移动到200mm处
CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand); CommandFuture motorXPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorXPositionSetCommand);
commandWait(motorXPositionSetCommandFuture); commandWait(motorXPositionSetCommandFuture);
@ -44,8 +44,8 @@ public class MoveTestCommand extends BaseCommandHandler {
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "2、x轴电机检测完毕", 50, "success")); webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "2、x轴电机检测完毕", 50, "success"));
DeviceCommand motorYPositionSetCommand = DeviceCommandGenerator.motorYPositionSet(100.0);//y轴移动100mm
CommandFuture motorYPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorYPositionSetCommand);
DeviceCommand motorYPositionSetCommand = DeviceCommandGenerator.motorYPositionSet(100.0, 20.0);//y轴移动100mm
CommandFuture motorYPositionSetCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorYPositionSetCommand);
commandWait(motorYPositionSetCommandFuture); commandWait(motorYPositionSetCommandFuture);
DeviceCommand motorYOriginCommand = DeviceCommandGenerator.motorYOrigin();//y轴回原点 DeviceCommand motorYOriginCommand = DeviceCommandGenerator.motorYOrigin();//y轴回原点
@ -53,7 +53,7 @@ public class MoveTestCommand extends BaseCommandHandler {
commandWait(motorYOriginCommandFuture); commandWait(motorYOriginCommandFuture);
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "3、y轴电机检测完毕", 75, "success")); webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "3、y轴电机检测完毕", 75, "success"));
DeviceCommand motorZPositionCommand = DeviceCommandGenerator.motorZPositionSet(50.0);//z轴50mm处
DeviceCommand motorZPositionCommand = DeviceCommandGenerator.motorZPositionSet(50.0, 20.0);//z轴50mm处
CommandFuture motorZPositionCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionCommand); CommandFuture motorZPositionCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZPositionCommand);
commandWait(motorZPositionCommandFuture); commandWait(motorZPositionCommandFuture);
@ -62,7 +62,7 @@ public class MoveTestCommand extends BaseCommandHandler {
commandWait(motorZOriginCommandFuture); commandWait(motorZOriginCommandFuture);
webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "4、z轴电机检测完毕", 100, "success")); webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(form.getCmdId(), form.getCmdCode(), "4、z轴电机检测完毕", 100, "success"));
} finally { } finally {
// deviceStatus.setSelfTestCompleted(true);
// deviceStatus.setSelfTestCompleted(true);
} }
}); });
} }
Loading…
Cancel
Save