From 32245aa9d39b7f0f0ae28db81f7fbed9f6034de3 Mon Sep 17 00:00:00 2001 From: Patrick Goebel Date: Sun, 6 Dec 2015 16:13:37 -0800 Subject: [PATCH] Fixed ServoRead service handler so that it actually returns a value other than 0 --- ros_arduino_python/nodes/arduino_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros_arduino_python/nodes/arduino_node.py b/ros_arduino_python/nodes/arduino_node.py index d281f9e..eae7a73 100755 --- a/ros_arduino_python/nodes/arduino_node.py +++ b/ros_arduino_python/nodes/arduino_node.py @@ -172,8 +172,8 @@ class ArduinoROS(): return ServoWriteResponse() def ServoReadHandler(self, req): - self.controller.servo_read(req.id) - return ServoReadResponse() + pos = self.controller.servo_read(req.id) + return ServoReadResponse(pos) def DigitalSetDirectionHandler(self, req): self.controller.pin_mode(req.pin, req.direction)