|
|
@ -29,9 +29,11 @@ public class DebugLiquidMotorMoveToCommand extends BaseCommandHandler { |
|
|
|
Double position = cmdDTO.getDoubleParam("position"); |
|
|
|
Double speed = cmdDTO.getDoubleParam("speed"); |
|
|
|
return runAsync(() -> { |
|
|
|
DeviceCommandBundle liquidMotorSetDeviceCommandBundle = DeviceCommandGenerator.liquidMotorSet(speed); |
|
|
|
CommandFuture liquidMotorSetDeviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidMotorSetDeviceCommandBundle); |
|
|
|
CommandUtil.wait(liquidMotorSetDeviceCommandFuture); |
|
|
|
if(speed != null){ |
|
|
|
DeviceCommandBundle liquidMotorSetDeviceCommandBundle = DeviceCommandGenerator.liquidMotorSet(speed); |
|
|
|
CommandFuture liquidMotorSetDeviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidMotorSetDeviceCommandBundle); |
|
|
|
CommandUtil.wait(liquidMotorSetDeviceCommandFuture); |
|
|
|
} |
|
|
|
|
|
|
|
DeviceCommandBundle liquidMotorMoveDeviceCommandBundle = DeviceCommandGenerator.solutionMotorMove(position); |
|
|
|
CommandFuture liquidMotorMoveDeviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidMotorMoveDeviceCommandBundle); |
|
|
|