From 93791586f046cc132b8426151e895f59381dddbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 13 Feb 2024 13:32:14 +0100 Subject: [PATCH] added register listener with callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/app.py b/server/app.py index dec778d..521cc4a 100644 --- a/server/app.py +++ b/server/app.py @@ -121,13 +121,13 @@ def mqtt_publisher(universe): print(str(get_eth0_ip())) receiver.start() - def callback(packet): # packet type: sacn.DataPacket + def on_dmx_frame(packet, universe, channel_data): # packet type: sacn.DataPacket print(packet.dmxData) global dmx_values dmx_values = packet.dmxData + receiver.join_multicast(universe) - receiver.listen_on('universe', universe=universe) - receiver.register_listener('universe', universe=universe, callback=callback) + receiver.register_listener(universe, on_dmx_frame) while True: if dmx_values is not None: