mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-04 03:34:08 +05:30
Fixed ServoRead service handler so that it actually returns a value other than 0
This commit is contained in:
parent
1f3ae62769
commit
32245aa9d3
@ -172,8 +172,8 @@ class ArduinoROS():
|
|||||||
return ServoWriteResponse()
|
return ServoWriteResponse()
|
||||||
|
|
||||||
def ServoReadHandler(self, req):
|
def ServoReadHandler(self, req):
|
||||||
self.controller.servo_read(req.id)
|
pos = self.controller.servo_read(req.id)
|
||||||
return ServoReadResponse()
|
return ServoReadResponse(pos)
|
||||||
|
|
||||||
def DigitalSetDirectionHandler(self, req):
|
def DigitalSetDirectionHandler(self, req):
|
||||||
self.controller.pin_mode(req.pin, req.direction)
|
self.controller.pin_mode(req.pin, req.direction)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user