From 7eaf3bcfe8c4d890611034bfb4a43910d50839d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Wed, 16 Aug 2023 10:01:10 +0200 Subject: [PATCH] update --- rmp220_middleware/rmp220_middleware.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rmp220_middleware/rmp220_middleware.py b/rmp220_middleware/rmp220_middleware.py index 4476c2b..8b03939 100644 --- a/rmp220_middleware/rmp220_middleware.py +++ b/rmp220_middleware/rmp220_middleware.py @@ -66,11 +66,13 @@ class StateMachineNode(Node): # self.state = State.ENABLED # self.get_logger().info("State: ENABLED (Joystick)") # self.enable_chassis() - if self.state == State.DISABLED and msg.buttons[7] == 1: # Joystick button 'start' + # if self.state == State.DISABLED and msg.buttons[7] == 1: # Joystick button 'start' + if msg.buttons[7] == 1: # Joystick button 'start' self.state = State.ENABLED self.get_logger().info("State: ENABLED (Button 'start')") self.enable_chassis() - if self.state == State.ENABLED and msg.buttons[6] == 1: # Joystick button 'select' + # if self.state == State.ENABLED and msg.buttons[6] == 1: # Joystick button 'select' + if msg.buttons[6] == 1: # Joystick button 'select' self.state = State.DISABLED self.get_logger().info("State: DISABLED (Button 'select')") self.disable_chassis()