From 2ac295ee9a9cd2cfb2b26b2c67adebb7a12c1d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 16 Feb 2024 01:38:24 +0100 Subject: [PATCH] testing what is in the artnet packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/exampleReceiver.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/server/exampleReceiver.py b/server/exampleReceiver.py index ceed5d9..c2a5cae 100644 --- a/server/exampleReceiver.py +++ b/server/exampleReceiver.py @@ -28,18 +28,12 @@ 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: - # 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)) + print(artNetPacket) except KeyboardInterrupt: break + except Exception as e: + print(e) # Close the various connections cleanly so nothing explodes :) artNet.close()