Skip to content

Commit

Permalink
Merge pull request ZebraDevs#21 from fetchrobotics/deadman_to_tuck
Browse files Browse the repository at this point in the history
required deadman to tuck arm
  • Loading branch information
mikeferguson committed Sep 27, 2015
2 parents 87a9b7c + 42dedad commit c0d5381
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fetch_teleop/scripts/tuck_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class TuckArmTeleop:

def __init__(self):
self.tuck_button = rospy.get_param("~tuck_button", 6) # default button is the down button
self.deadman = rospy.get_param("~deadman_button", 10)
self.tucking = False

self.pressed = False
Expand All @@ -104,7 +105,7 @@ def joy_callback(self, msg):
# only run once
return
try:
if msg.buttons[self.tuck_button] > 0:
if msg.buttons[self.tuck_button] > 0 and msg.buttons[self.deadman] > 0:
if not self.pressed:
self.pressed_last = rospy.Time.now()
self.pressed = True
Expand Down

0 comments on commit c0d5381

Please sign in to comment.