From 374351c59eeacd5380a45f11b7bb5fabe4011ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ellensohn?= Date: Tue, 22 Aug 2023 10:34:45 +0200 Subject: [PATCH] changes in operation: testing --- rmp220_middleware/rmp220_middleware.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rmp220_middleware/rmp220_middleware.py b/rmp220_middleware/rmp220_middleware.py index b793a6a..e106262 100644 --- a/rmp220_middleware/rmp220_middleware.py +++ b/rmp220_middleware/rmp220_middleware.py @@ -61,7 +61,7 @@ class StateMachineNode(Node): def chassis_mode_callback(self, msg): # Handle the incoming chassis status message, will update every second - + if self.state == State.PAUSED: return else: @@ -129,10 +129,10 @@ class StateMachineNode(Node): self.timeout = 20.0 def timer_callback(self): - # if self.chassis_mode == State.DISABLED or self.chassis_mode == State.STOPPED or self.chassis_mode == State.PASSIVE: - # return # Do nothing if chassis is disabled, stopped or passive --> should save processing power - if self.state == State.PAUSED: - return # Do nothing if state is paused --> should save processing power + if self.state == State.PAUSED or self.state == State.STOPPED or self.state == State.PASSIVE: + return # Do nothing if chassis is disabled, stopped or passive --> should save processing power + # if self.state == State.PAUSED: + # return # Do nothing if state is paused --> should save processing power if self.state == State.ENABLED: if self.timeout <= 0: self.state = State.DISABLED