From 578288d53aef8c04ceb34dbb876c8fa0b8f03bc7 Mon Sep 17 00:00:00 2001 From: Nic Jones Date: Mon, 27 Oct 2025 23:59:05 -0400 Subject: [PATCH] Fix the prints --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 2b8169e..f64317e 100755 --- a/main.py +++ b/main.py @@ -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