From 84d4a97f5696f9a3d266e5d0c24e31b40d474760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Wed, 14 Feb 2024 02:36:08 +0100 Subject: [PATCH] added some debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/app.py b/server/app.py index 7348f94..9340b54 100644 --- a/server/app.py +++ b/server/app.py @@ -140,6 +140,11 @@ def mqtt_publisher(artnetUniverse): for i in range(512): # Lists in python start at 0, print(dmxPacket[i-1], end=" ") + else: + print("Packet universe isn't the universe that was given. Given universe: "+str(artnetUniverse)) + + else: + print("No data found in packet for universe: "+artnetUniverse) except KeyboardInterrupt: break except Exception as e: @@ -148,9 +153,9 @@ def mqtt_publisher(artnetUniverse): def start_mqtt_publishers(universe_count): used_universes = universe_count print("universe count: "+str(used_universes)) - # universes_to_publish = list(range(1, used_universes + 1)) + universes_to_publish = list(range(1, used_universes + 1)) # Create and start a thread for each universe - for universe in range(1): + for universe in range(universes_to_publish): threads = [threading.Thread(target=mqtt_publisher, args=(universe,))] for thread in threads: