Skip to content

Commit

Permalink
display fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanzemlin committed May 29, 2024
1 parent 582c76a commit 5935912
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autonav_ws/src/autonav_serial/src/serial_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ def system_state_transition(self, old: SystemStateEnum, updated: SystemStateEnum

# If we enter autonomous mode, we need to send a stop message to the motors
if old.state != SystemStateEnum.AUTONOMOUS and updated.state == SystemStateEnum.AUTONOMOUS:
self.set_system_mobility(False)
can_msg = can.Message(arbitration_id=MOBILITY_STOP_ID, data=bytes([0]))
try:
self.can.send(can_msg)
except can.CanError:
pass

if old.state == SystemStateEnum.AUTONOMOUS and updated.state != SystemStateEnum.AUTONOMOUS:
self.set_system_mobility(False)
can_msg = can.Message(arbitration_id=MOBILITY_STOP_ID, data=bytes([0]))
try:
self.can.send(can_msg)
Expand Down

0 comments on commit 5935912

Please sign in to comment.