|
|
@ -27,12 +27,13 @@ public class HoldingJawOpenCommandHandler extends BaseCommandHandler { |
|
|
|
public CompletableFuture<Void> handle(CmdDTO cmdDTO) { |
|
|
|
return runAsync(() -> { |
|
|
|
Double velocity = cmdDTO.getDoubleParam("velocity"); |
|
|
|
Double distance = cmdDTO.getDoubleParam("distance"); |
|
|
|
if(velocity != null) { |
|
|
|
DeviceCommandBundle deviceCommand = DeviceCommandGenerator.clawSet(velocity); |
|
|
|
CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), deviceCommand); |
|
|
|
commandWait(deviceCommandFuture); |
|
|
|
} |
|
|
|
DeviceCommandBundle deviceCommand = DeviceCommandGenerator.clawMove(100.0); |
|
|
|
DeviceCommandBundle deviceCommand = DeviceCommandGenerator.clawMove(distance); |
|
|
|
CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), deviceCommand); |
|
|
|
commandWait(deviceCommandFuture); |
|
|
|
}); |
|
|
|