Update web, disable sensors in testing mode
This commit is contained in:
parent
af91817a98
commit
1ac8712e0f
@ -1 +1 @@
|
||||
Subproject commit a2e94baadc8a8cc702d2a5ceb1170914e690d0e7
|
||||
Subproject commit 5a3943ae46b62112017641adb06ed48969ae6298
|
BIN
map.png
BIN
map.png
Binary file not shown.
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 340 KiB |
@ -1,6 +1,6 @@
|
||||
# Runtime
|
||||
camelot-py[base]==0.9.0
|
||||
#opencv-python
|
||||
opencv-python
|
||||
pypdf2==2.12.1
|
||||
alive-progress
|
||||
requests
|
||||
|
6
run.py
6
run.py
@ -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,6 +423,7 @@ def setup_server(pool, manager):
|
||||
if sensor_ready is False:
|
||||
fprint("waiting for " + "Sensor Initialization" + " to complete...", sendqueue=to_server_queue)
|
||||
global mbconn
|
||||
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)
|
||||
@ -772,7 +773,10 @@ def mainloop_server(pool, manager):
|
||||
else:
|
||||
global mainloop_get
|
||||
#print("Checking sensors..")
|
||||
if real:
|
||||
newtube = get_sensors()
|
||||
else:
|
||||
newtube = -1
|
||||
if newtube >= 0:
|
||||
# need to return a cable
|
||||
mainloop_get.put(("return", newtube))
|
||||
|
Loading…
x
Reference in New Issue
Block a user