Update IPs for LED system

This commit is contained in:
Cole Deck 2024-04-12 20:28:33 -05:00
parent 4973fc79be
commit 145f51d08c
4 changed files with 29 additions and 23 deletions

View File

@ -26,55 +26,55 @@ cameras:
led: led:
fps: 90 fps: 90
timeout: 0 timeout: 1
controllers: controllers:
- universe: 9 - universe: 0
ip: 192.168.68.131 ip: 192.168.1.200
ledstart: 0 ledstart: 0
ledend: 143 ledend: 143
mode: rgb mode: rgb
- universe: 3 - universe: 1
ip: 192.168.68.131 ip: 192.168.1.201
ledstart: 144 ledstart: 144
ledend: 287 ledend: 287
mode: rgb mode: rgb
- universe: 2 - universe: 2
ip: 192.168.68.131 ip: 192.168.1.202
ledstart: 288 ledstart: 288
ledend: 431 ledend: 431
mode: rgb mode: rgb
- universe: 4 - universe: 3
ip: 192.168.5.40 ip: 192.168.1.203
ledstart: 432 ledstart: 432
ledend: 575 ledend: 575
mode: rgb mode: rgb
- universe: 1 - universe: 4
ip: 192.168.5.4 ip: 192.168.1.204
ledstart: 576 ledstart: 576
ledend: 719 ledend: 719
mode: rgb mode: rgb
- universe: 5 - universe: 5
ip: 192.168.68.131 ip: 192.168.1.205
ledstart: 720 ledstart: 720
ledend: 863 ledend: 863
mode: rgb mode: rgb
- universe: 6 - universe: 6
ip: 192.168.68.131 ip: 192.168.1.206
ledstart: 864 ledstart: 864
ledend: 1007 ledend: 1007
mode: rgb mode: rgb
- universe: 7 - universe: 7
ip: 192.168.68.131 ip: 192.168.1.207
ledstart: 1008 ledstart: 1008
ledend: 1151 ledend: 1151
mode: rgb mode: rgb
- universe: 8 - universe: 8
ip: 192.168.68.131 ip: 192.168.1.208
ledstart: 1152 ledstart: 1152
ledend: 1295 ledend: 1295
mode: rgb mode: rgb
- universe: 0 - universe: 9
ip: 192.168.68.130 ip: 192.168.1.209
ledstart: 1296 ledstart: 1296
ledend: 1365 ledend: 1365
mode: rgbw mode: rgbw

View File

@ -68,6 +68,7 @@ class LEDSystem():
self.leds_size = list() self.leds_size = list()
self.controllers = list() self.controllers = list()
self.rings = list(range(len(self.config["position_map"]))) self.rings = list(range(len(self.config["position_map"])))
print("Setting ring status")
self.ringstatus = list(range(len(self.config["position_map"]))) self.ringstatus = list(range(len(self.config["position_map"])))
#print(rings) #print(rings)
#fprint(config["led"]["map"]) #fprint(config["led"]["map"])
@ -186,16 +187,19 @@ class LEDSystem():
self.map() self.map()
self.sender = sacn.sACNsender(fps=self.config["led"]["fps"], universeDiscovery=False) self.sender = sacn.sACNsender(fps=self.config["led"]["fps"], universeDiscovery=False)
self.sender.start() # start the sending thread self.sender.start() # start the sending thread
"""for x in range(len(self.controllers)): for x in range(len(self.controllers)):
print("Waiting for the controller at", self.controllers[x][2], "to be online...", end="") print("Waiting for the controller at", self.controllers[x][2], "to be online...", end="", flush=True)
count = 0 count = 0
while not ping(self.controllers[x][2]): while not self.ping(self.controllers[x][2]):
count = count + 1 count = count + 1
if count >= self.config["led"]["timeout"]: if count >= self.config["led"]["timeout"]:
fprint(" ERROR: controller still offline after " + str(count) + " seconds, continuing...") print(" ERROR: controller still offline after " + str(count) + " seconds, continuing...")
break break
if count < self.config["led"]["timeout"]: else:
fprint(" done")""" print(" done")
#if count < self.config["led"]["timeout"]:
time.sleep(1)
for x in range(len(self.controllers)): for x in range(len(self.controllers)):
print("Activating controller", x, "at", self.controllers[x][2], "with", self.controllers[x][1]-self.controllers[x][0], "LEDs.") print("Activating controller", x, "at", self.controllers[x][2], "with", self.controllers[x][1]-self.controllers[x][0], "LEDs.")
self.sender.activate_output(x+1) # start sending out data self.sender.activate_output(x+1) # start sending out data
@ -320,7 +324,7 @@ class LEDSystem():
# loading animation. cable check # loading animation. cable check
if self.firstrun: if self.firstrun:
self.changecount = self.animation_time * 3 self.changecount = self.animation_time * 3
firstrun = False self.firstrun = False
for x in range(len(self.ringstatus)): for x in range(len(self.ringstatus)):
self.ringstatus[x] = [True, self.animation_time] self.ringstatus[x] = [True, self.animation_time]
@ -645,6 +649,7 @@ if __name__ == "__main__":
show = False show = False
ring = 1 ring = 1
ledsys = LEDSystem() ledsys = LEDSystem()
ledsys.init()
ledsys.startup_animation(show) ledsys.startup_animation(show)
for x in range(54): for x in range(54):
ledsys.ringstatus[x][0] = True ledsys.ringstatus[x][0] = True

BIN
map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

After

Width:  |  Height:  |  Size: 370 KiB

View File

@ -20,6 +20,7 @@ pyarrow
ghostscript ghostscript
pyzbar pyzbar
segno segno
pyModbusTCP
# Development # Development
matplotlib matplotlib