added some debugging

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-14 02:36:08 +01:00
parent ee7e4a3ea8
commit 84d4a97f56
1 changed files with 7 additions and 2 deletions

View File

@ -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: