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