parent
a9c2e03333
commit
aea9d23eef
|
@ -3,8 +3,6 @@ import sys
|
||||||
import python_artnet as Artnet
|
import python_artnet as Artnet
|
||||||
import os
|
import os
|
||||||
|
|
||||||
artnet = Artnet.Artnet()
|
|
||||||
|
|
||||||
def get_eth0_ip():
|
def get_eth0_ip():
|
||||||
try:
|
try:
|
||||||
# Get the IP address of the eth0 interface
|
# Get the IP address of the eth0 interface
|
||||||
|
@ -14,10 +12,11 @@ def get_eth0_ip():
|
||||||
print(f"Error getting eth0 IP: {e}")
|
print(f"Error getting eth0 IP: {e}")
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
artnet = Artnet.Artnet(BINDIP=get_eth0_ip)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
artNetPacket = artnet.readPacket()
|
||||||
artNetPacket = artnet.readPacket(BINDIP=get_eth0_ip)
|
|
||||||
if artNetPacket is not None and artNetPacket.data is not None:
|
if artNetPacket is not None and artNetPacket.data is not None:
|
||||||
if artNetPacket.universe == 0:
|
if artNetPacket.universe == 0:
|
||||||
print("Universe was the specified universe: "+str(artNetPacket.universe))
|
print("Universe was the specified universe: "+str(artNetPacket.universe))
|
||||||
|
|
Loading…
Reference in New Issue