testing some weird siht

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 17:10:56 +01:00
parent 8ece5779ae
commit 923f0e4685
1 changed files with 7 additions and 5 deletions

View File

@ -114,10 +114,6 @@ def mqtt_publisher():
artnetBindIp = get_eth0_ip()
artNet = Artnet.Artnet(BINDIP = artnetBindIp, DEBUG = True, SHORTNAME = "PiXelTubeMaster", LONGNAME = "PiXelTubeMaster", PORT = 6454)
while True:
cur = db.cursor()
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
TUBE_INDEX = cur.fetchall()
cur.close()
try:
# Gets whatever the last Art-Net packet we received is
artNetPacket = artNet.readPacket()
@ -149,4 +145,10 @@ if __name__ == "__main__":
flask_thread = Process(target=flask_api)
flask_thread.start()
publisher_thread = Process(target=mqtt_publisher)
publisher_thread.start()
publisher_thread.start()
while True:
cur = db.cursor()
cur.execute("SELECT mac_address, universe, dmx_address FROM tubes")
TUBE_INDEX = cur.fetchall()
cur.close()
time.sleep(1)