Browse Source

fix:修复编译错误

tags/freeze freeze
黄翔 3 months ago
parent
commit
035ac804e6
  1. 15
      src/main/java/com/iflytop/gd/debug/services/cmds/CoverElevatorLiftDownCommandHandler.java

15
src/main/java/com/iflytop/gd/debug/services/cmds/CoverElevatorLiftDownCommandHandler.java

@ -19,20 +19,9 @@ import org.springframework.stereotype.Component;
@Component @Component
@RequiredArgsConstructor @RequiredArgsConstructor
@CommandMapping("debug_cover_elevator_lift_down") @CommandMapping("debug_cover_elevator_lift_down")
public class CoverElevatorLiftDownCommandHandler implements CommandHandler {
private final WebSocketService webSocketService;
private final StepMotor stepMotor;
public class CoverElevatorLiftDownCommandHandler extends BaseCommandHandler {
@Override @Override
public void handle(CmdDTO cmdDTO) { public void handle(CmdDTO cmdDTO) {
webSocketService.pushNotification(Notification.infoHandleStartNotification(cmdDTO));
try {
Integer velocity = cmdDTO.getIntegerParam("velocity");
String velocityUnitStr = cmdDTO.getStringParam("velocityUnit");
VelocityUnit velocityUnit = VelocityUnit.toVelocityUnit(velocityUnitStr);
stepMotor.setDefaultVelocity(velocityUnit.toMM_PER_SEC(velocity));
} catch (Exception e) {
webSocketService.pushNotification(Notification.errorNotification(cmdDTO, e));
}
webSocketService.pushNotification(Notification.infoHandleEndNotification(cmdDTO));
} }
} }
Loading…
Cancel
Save