|
|
@ -39,11 +39,24 @@ public class DeviceSelfTest extends BaseCommandHandler { |
|
|
|
DeviceCommand motorZOriginCommand = DeviceCommandGenerator.motorZOrigin();//z轴回原点 |
|
|
|
CommandFuture motorZOriginCommandFuture = deviceCommandService.sendCommand(form.getCmdId(), form.getCmdCode(), motorZOriginCommand); |
|
|
|
commandWait(motorXOriginCommandFuture, motorYOriginCommandFuture, motorZOriginCommandFuture); |
|
|
|
|
|
|
|
selfTestService.getSelfTestStatus().setXAxisAtOrigin(true); |
|
|
|
selfTestService.getSelfTestStatus().setYAxisAtOrigin(true); |
|
|
|
selfTestService.getSelfTestStatus().setZAxisAtOrigin(true); |
|
|
|
|
|
|
|
try { |
|
|
|
if (motorXOriginCommandFuture.getResponseResult().getBool("status")) { |
|
|
|
selfTestService.getSelfTestStatus().setXAxisAtOrigin(true); |
|
|
|
} |
|
|
|
} catch (Exception ignored) { |
|
|
|
} |
|
|
|
try { |
|
|
|
if (motorYOriginCommandFuture.getResponseResult().getBool("status")) { |
|
|
|
selfTestService.getSelfTestStatus().setYAxisAtOrigin(true); |
|
|
|
} |
|
|
|
} catch (Exception ignored) { |
|
|
|
} |
|
|
|
try { |
|
|
|
if (motorZOriginCommandFuture.getResponseResult().getBool("status")) { |
|
|
|
selfTestService.getSelfTestStatus().setZAxisAtOrigin(true); |
|
|
|
} |
|
|
|
} catch (Exception ignored) { |
|
|
|
} |
|
|
|
deviceStatus.setSelfTestCompleted(true); |
|
|
|
}); |
|
|
|
} |
|
|
|