diff --git a/run.py b/run.py index 6bc6886..ec3fb79 100755 --- a/run.py +++ b/run.py @@ -461,7 +461,8 @@ def get_sensors(): global mbconn global sensors #print("Reading sensors") - mbconn.open() + if not mbconn.is_open: + mbconn.open() """ port 1: 256 port 2: 272 @@ -488,7 +489,7 @@ def get_sensors(): out = [0, 0, 0, 0] #fprint("Values: " + str(sensors)) - mbconn.close() + #mbconn.close() for x in range(len(sensors)): if sensors[x] >= 180: # 3 sec # cable newly detected on tray