parent
62c704afe3
commit
2ac295ee9a
|
@ -28,18 +28,12 @@ while True:
|
||||||
try:
|
try:
|
||||||
# Gets whatever the last Art-Net packet we received is
|
# Gets whatever the last Art-Net packet we received is
|
||||||
artNetPacket = artNet.readPacket()
|
artNetPacket = artNet.readPacket()
|
||||||
# Make sure we actually *have* a packet
|
print(artNetPacket)
|
||||||
if artNetPacket is not None and artNetPacket.data is not None:
|
|
||||||
# Checks to see if the current packet is for the specified DMX Universe
|
|
||||||
if artNetPacket.universe == artnetUniverse:
|
|
||||||
print("Received specified universe: "+str(artNetPacket.universe))
|
|
||||||
|
|
||||||
# Print a newline so things look nice :)
|
|
||||||
else:
|
|
||||||
print("Did not receive specified universe. The received universe was universe: "+str(artNetPacket.universe))
|
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
break
|
break
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
# Close the various connections cleanly so nothing explodes :)
|
# Close the various connections cleanly so nothing explodes :)
|
||||||
artNet.close()
|
artNet.close()
|
||||||
|
|
Loading…
Reference in New Issue