From 92596c911120612979dc36e5c2c0a66a0e144afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Wed, 14 Feb 2024 02:17:30 +0100 Subject: [PATCH] fixed universe var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/app.py b/server/app.py index b1ac160..895fcdc 100644 --- a/server/app.py +++ b/server/app.py @@ -112,8 +112,7 @@ def connect_mqtt(): return client -def mqtt_publisher(universe): - artnetUniverse = universe-1 +def mqtt_publisher(artnetUniverse): mqtt_client = connect_mqtt() artnetBindIp = "192.168.0.1" artNet = Artnet.Artnet(BINDIP = artnetBindIp, DEBUG = False, SHORTNAME = "PiXelTubeMaster", LONGNAME = "PiXelTubeMaster", PORT = 6454, REFRESH=30) @@ -149,19 +148,15 @@ 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)) - print(2) # Create and start a thread for each universe for universe in universes_to_publish: threads = [threading.Thread(target=mqtt_publisher, args=(universe,))] - print(3) for thread in threads: thread.start() - print(4) for thread in threads: thread.join() - print(5) if __name__ == "__main__": start_mqtt_publishers(universe_count)