Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-20 16:13:06 +01:00
parent ebadb68c18
commit b758e89f5a
1 changed files with 11 additions and 12 deletions

View File

@ -117,18 +117,17 @@ def mqtt_publisher(ti_queue):
artNet = Artnet.Artnet(BINDIP = artnetBindIp, DEBUG = True, SHORTNAME = "PiXelTubeMaster", LONGNAME = "PiXelTubeMaster", PORT = 6454) artNet = Artnet.Artnet(BINDIP = artnetBindIp, DEBUG = True, SHORTNAME = "PiXelTubeMaster", LONGNAME = "PiXelTubeMaster", PORT = 6454)
while True: while True:
try: try:
try: # try:
start = time.time() start = time.time()
tube_index = ti_queue.get(block=False) tube_index = ti_queue.get(block=False)
end = time.time() end = time.time()
print("Receiving of tube index took: "+str(end-start)) print("Receiving of tube index took: "+str(end-start))
tube_index_old = tube_index tube_index_old = tube_index
except Exception as e: # except:
print(e) # if tube_index_old is not None:
if tube_index_old is not None: # tube_index = tube_index_old
tube_index = tube_index_old # else:
else: # tube_index = None
tube_index = None
# 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 # Make sure we actually *have* a packet