Signed-off-by: Ebbe Baß <ebbe.bass>
This commit is contained in:
Ebbe Baß
2024-02-15 11:31:51 +01:00
parent 0042a51fce
commit 1b6e93c051
2 changed files with 17 additions and 46 deletions
+12 -11
View File
@@ -21,18 +21,19 @@ artnetBindIp = get_eth0_ip()
artNet = Artnet.Artnet(BINDIP = artnetBindIp, DEBUG = False, SHORTNAME = "PiXelTubeMaster", LONGNAME = "PiXelTubeMaster", PORT = 6454)
tuple_ip = (str(get_eth0_ip()), 6454)
artNet.art_pol_reply(tuple_ip)
while True:
try:
# Gets whatever the last Art-Net packet we received is
artNetPacket = artNet.readPacket()
# Make sure we actually *have* a packet
if artNetPacket is not None and artNetPacket.data is not None:
print("Universe: "+str(artNetPacket.universe))
# Stores the packet data array
dmxPacket = artNetPacket.data
print(type(artNet.readPacket()))
# while True:
# try:
# # Gets whatever the last Art-Net packet we received is
# artNetPacket = artNet.readPacket()
# # Make sure we actually *have* a packet
# if artNetPacket is not None and artNetPacket.data is not None:
# print("Universe: "+str(artNetPacket.universe))
# # Stores the packet data array
# dmxPacket = artNetPacket.data
except KeyboardInterrupt:
break
# except KeyboardInterrupt:
# break
# Close the various connections cleanly so nothing explodes :)
artNet.close()