changes in operation: testing

This commit is contained in:
Björn Ellensohn 2023-08-22 09:17:54 +02:00
parent 812b58ac89
commit 7d081e7c66

View File

@ -64,13 +64,16 @@ class StateMachineNode(Node):
# Need to figure out the type # Need to figure out the type
if msg.chassis_mode == 0: if msg.chassis_mode == 0:
self.chassis_mode = State.DISABLED self.chassis_mode = State.DISABLED
self.state = State.DISABLED
if msg.chassis_mode == 1: # Assuming 1 represents enabled and 0 represents disabled if msg.chassis_mode == 1: # Assuming 1 represents enabled and 0 represents disabled
self.chassis_mode = State.ENABLED self.chassis_mode = State.ENABLED
self.state = State.ENABLED
if msg.chassis_mode == 2: if msg.chassis_mode == 2:
self.chassis_mode = State.PASSIVE self.chassis_mode = State.PASSIVE
self.state = State.PASSIVE
if msg.chassis_mode == 3: if msg.chassis_mode == 3:
self.chassis_mode = State.STOPPED self.chassis_mode = State.STOPPED
self.state = State.STOPPED
def get_chassis_mode(self): def get_chassis_mode(self):
return self.chassis_mode return self.chassis_mode