Commit ec19188a authored by francois's avatar francois
Browse files

use local variable

parent 309fc8a6
...@@ -137,8 +137,6 @@ def rc_override_control(args): ...@@ -137,8 +137,6 @@ def rc_override_control(args):
override_pub = rospy.Publisher(mavros.get_topic("rc", "override"), OverrideRCIn, queue_size=10) override_pub = rospy.Publisher(mavros.get_topic("rc", "override"), OverrideRCIn, queue_size=10)
def joy_cb(joy): def joy_cb(joy):
global rc # must be global to retain mode value
# get axes normalized to -1.0..+1.0 RPY, 0.0..1.0 T # get axes normalized to -1.0..+1.0 RPY, 0.0..1.0 T
roll = get_axis(joy, 'roll') roll = get_axis(joy, 'roll')
pitch = get_axis(joy, 'pitch') pitch = get_axis(joy, 'pitch')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment