From ee21cafdba3fcdc8366cdfb61b4dce3c120a7f2d Mon Sep 17 00:00:00 2001 From: Alastair D'Silva Date: Tue, 29 Oct 2019 11:00:12 +1100 Subject: [PATCH] Reopen serial port if all slaves drop Signed-off-by: Alastair D'Silva --- TWCManager.py | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 TWCManager.py diff --git a/TWCManager.py b/TWCManager.py old mode 100644 new mode 100755 index feaa0a90..c1500f82 --- a/TWCManager.py +++ b/TWCManager.py @@ -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.