Fix the prints

This commit is contained in:
2025-10-27 23:59:05 -04:00
parent 7d16f0fd20
commit 578288d53a

View File

@@ -140,7 +140,7 @@ def main():
run = True
first_run = True
connected = False
waiting_for_connection = False
while run:
# Get the list of devices
@@ -152,12 +152,13 @@ def main():
# Device is not yet connected
device = config["Global"]["device"] # reset device to config value, in case it was TCP/IP before
first_run = True
if not connected:
if not waiting_for_connection:
logging.info("No device connected. Waiting silently until a device is connected.")
waiting_for_connection = True
time.sleep(10)
continue
connected = True
waiting_for_connection = False
if device and device not in devices:
time.sleep(60)
continue