parent
b5ec4ba7d1
commit
18da411702
|
@ -121,12 +121,14 @@ def mqtt_publisher(universe):
|
||||||
print(str(get_eth0_ip()))
|
print(str(get_eth0_ip()))
|
||||||
receiver.start()
|
receiver.start()
|
||||||
|
|
||||||
@receiver.listen_on('universe', universe=universe) # listens on universe 1
|
@receiver.listen_on('universe', universe=universe)
|
||||||
|
@receiver.register_listener('universe', universe=universe)
|
||||||
def callback(packet): # packet type: sacn.DataPacket
|
def callback(packet): # packet type: sacn.DataPacket
|
||||||
print(packet.dmxData)
|
print(packet.dmxData)
|
||||||
global dmx_values
|
global dmx_values
|
||||||
dmx_values = packet.dmxData
|
dmx_values = packet.dmxData
|
||||||
receiver.join_multicast(universe)
|
receiver.join_multicast(universe)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
if dmx_values is not None:
|
if dmx_values is not None:
|
||||||
for channel, value in enumerate(dmx_values):
|
for channel, value in enumerate(dmx_values):
|
||||||
|
|
Loading…
Reference in New Issue