Update web, disable sensors in testing mode

This commit is contained in:
Cole Deck 2024-07-29 12:06:15 -05:00
parent af91817a98
commit 1ac8712e0f
4 changed files with 10 additions and 6 deletions

@ -1 +1 @@
Subproject commit a2e94baadc8a8cc702d2a5ceb1170914e690d0e7
Subproject commit 5a3943ae46b62112017641adb06ed48969ae6298

BIN
map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 340 KiB

View File

@ -1,6 +1,6 @@
# Runtime
camelot-py[base]==0.9.0
#opencv-python
opencv-python
pypdf2==2.12.1
alive-progress
requests

12
run.py
View File

@ -32,7 +32,7 @@ from uptime import uptime
import fileserver
# set to false to run without real hardware for development
real = True
real = False
skip_scanning = True
mbconn = None
@ -423,8 +423,9 @@ def setup_server(pool, manager):
if sensor_ready is False:
fprint("waiting for " + "Sensor Initialization" + " to complete...", sendqueue=to_server_queue)
global mbconn
mbconn = ModbusClient(host="192.168.1.20", port=502, auto_open=False, auto_close=False)
get_sensors()
if real:
mbconn = ModbusClient(host="192.168.1.20", port=502, auto_open=False, auto_close=False)
get_sensors()
fprint("Sensors initialized.", sendqueue=to_server_queue)
if camera_ready is False:
@ -772,7 +773,10 @@ def mainloop_server(pool, manager):
else:
global mainloop_get
#print("Checking sensors..")
newtube = get_sensors()
if real:
newtube = get_sensors()
else:
newtube = -1
if newtube >= 0:
# need to return a cable
mainloop_get.put(("return", newtube))