mirror of
https://github.com/bjoernellens1/rmp220_middleware.git
synced 2024-11-21 23:43:46 +00:00
changes in operation: testing
This commit is contained in:
parent
0b57cbd437
commit
2829156fd1
@ -62,6 +62,7 @@ class StateMachineNode(Node):
|
|||||||
def chassis_mode_callback(self, msg):
|
def chassis_mode_callback(self, msg):
|
||||||
# Handle the incoming chassis status message, will update every second
|
# Handle the incoming chassis status message, will update every second
|
||||||
# Need to figure out the type
|
# Need to figure out the type
|
||||||
|
self.get_logger().info('Got chassis_mode =' + msg.chassis_mode + ' from chassis_mode_fb topic')
|
||||||
if msg.chassis_mode == 0:
|
if msg.chassis_mode == 0:
|
||||||
self.chassis_mode = State.DISABLED
|
self.chassis_mode = State.DISABLED
|
||||||
self.state = State.DISABLED
|
self.state = State.DISABLED
|
||||||
@ -124,8 +125,8 @@ class StateMachineNode(Node):
|
|||||||
self.timeout = 20.0
|
self.timeout = 20.0
|
||||||
|
|
||||||
def timer_callback(self):
|
def timer_callback(self):
|
||||||
if self.chassis_mode == State.DISABLED or self.chassis_mode == State.STOPPED or self.chassis_mode == State.PASSIVE:
|
# 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
|
# return # Do nothing if chassis is disabled, stopped or passive --> should save processing power
|
||||||
if self.state == State.ENABLED:
|
if self.state == State.ENABLED:
|
||||||
if self.timeout <= 0:
|
if self.timeout <= 0:
|
||||||
self.state = State.PAUSED
|
self.state = State.PAUSED
|
||||||
|
Loading…
Reference in New Issue
Block a user