From aea9d23eefe4932735e5421ffc503f3b4e9b3b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Thu, 15 Feb 2024 12:32:15 +0100 Subject: [PATCH] test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/exampleReceiver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/exampleReceiver.py b/server/exampleReceiver.py index cdefe8e..60f07f6 100644 --- a/server/exampleReceiver.py +++ b/server/exampleReceiver.py @@ -3,8 +3,6 @@ import sys import python_artnet as Artnet import os -artnet = Artnet.Artnet() - def get_eth0_ip(): try: # Get the IP address of the eth0 interface @@ -14,10 +12,11 @@ def get_eth0_ip(): print(f"Error getting eth0 IP: {e}") exit +artnet = Artnet.Artnet(BINDIP=get_eth0_ip) + while True: try: - - artNetPacket = artnet.readPacket(BINDIP=get_eth0_ip) + artNetPacket = artnet.readPacket() if artNetPacket is not None and artNetPacket.data is not None: if artNetPacket.universe == 0: print("Universe was the specified universe: "+str(artNetPacket.universe))