Skip to content

Commit

Permalink
Reopen serial port if all slaves drop
Browse files Browse the repository at this point in the history
Signed-off-by: Alastair D'Silva <[email protected]>
  • Loading branch information
deece committed Nov 4, 2019
1 parent 2be59b8 commit ee21caf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TWCManager.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2566,6 +2566,8 @@ def set_last_amps_offered(self, desiredAmpsOffered):
# If we have no slaves, try to re-establish the connection
if (numInitMsgsToSend == 0 and slave_count() == 0):
numInitMsgsToSend = 10
ser.close()
ser.open()

# A real master sends 5 copies of linkready1 and linkready2 whenever
# it starts up, which we do here.
Expand Down

0 comments on commit ee21caf

Please sign in to comment.