From 6f24c5a0e136c28ca4db12a023852731a11790b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sat, 17 Feb 2024 03:30:06 +0100 Subject: [PATCH] removed settings getting system. unnessesary now and only make random traffick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- client/main.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/client/main.py b/client/main.py index b456038..f8ec2de 100644 --- a/client/main.py +++ b/client/main.py @@ -85,19 +85,6 @@ def on_message(mqttc, obj, msg): for pixel in range(LEDS_PER_PIXEL*5, LEDS_PER_PIXEL*6): update_led_strip(list(msg.payload), pixel) - -def loopCheckSettingUpdates(): - while True: - try: - global universe - global dmx_address - universe, dmx_address = get_assigned_params() - print(universe, dmx_address) - except Exception as e: - print(f"Error: {e}") - exit() - time.sleep(2) - if __name__ == "__main__": # Connect to Wi-Fi if is_connected_to_wifi() is not None: @@ -116,10 +103,4 @@ if __name__ == "__main__": mqttc.subscribe("tube-"+str(wlan_mac_address)+"/p3", 0) mqttc.subscribe("tube-"+str(wlan_mac_address)+"/p4", 0) mqttc.subscribe("tube-"+str(wlan_mac_address)+"/p5", 0) - mqttc.subscribe("tube-"+str(wlan_mac_address)+"/p6", 0) - - settingsUpdateThread = Thread(target=loopCheckSettingUpdates, args=()) - pixelUpdateThread = Thread(target=mqtt_listner, args=(universe, dmx_address, strip, LEDS_PER_PIXEL)) - - settingsUpdateThread.start() - pixelUpdateThread.start() \ No newline at end of file + mqttc.subscribe("tube-"+str(wlan_mac_address)+"/p6", 0) \ No newline at end of file