Fixed ServoRead service handler so that it actually returns a value other than 0

This commit is contained in:
Patrick Goebel 2015-12-06 16:13:37 -08:00
parent 1f3ae62769
commit 32245aa9d3

View File

@ -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)