|
|
@ -248,4 +248,16 @@ public class StepMotorController { |
|
|
|
public Integer readEncPos(@RequestParam DeviceStepMotorId deviceId) throws HardwareException { |
|
|
|
return stepMotorService.readEncPos(deviceId); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/read-zero-sensor") |
|
|
|
@Operation(summary = "读取零点光电") |
|
|
|
public Boolean readZeroSensor(@RequestParam DeviceStepMotorId deviceId) throws HardwareException { |
|
|
|
return stepMotorService.readIoState(deviceId, 0); |
|
|
|
} |
|
|
|
@PostMapping("/read-limit-sensor") |
|
|
|
@Operation(summary = "读取限位光电") |
|
|
|
public Boolean readLimitSensor(@RequestParam DeviceStepMotorId deviceId) throws HardwareException { |
|
|
|
return stepMotorService.readIoState(deviceId, 1); |
|
|
|
} |
|
|
|
|
|
|
|
} |