diff --git a/TWCManager.py b/TWCManager.py index feaa0a90..6e22d064 100644 --- a/TWCManager.py +++ b/TWCManager.py @@ -119,6 +119,7 @@ import json from datetime import datetime import threading +from serial.threaded import ser ########################## @@ -2566,6 +2567,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.