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
|
# Runtime
|
||||||
camelot-py[base]==0.9.0
|
camelot-py[base]==0.9.0
|
||||||
#opencv-python
|
opencv-python
|
||||||
pypdf2==2.12.1
|
pypdf2==2.12.1
|
||||||
alive-progress
|
alive-progress
|
||||||
requests
|
requests
|
||||||
|
12
run.py
12
run.py
@ -32,7 +32,7 @@ from uptime import uptime
|
|||||||
import fileserver
|
import fileserver
|
||||||
|
|
||||||
# set to false to run without real hardware for development
|
# set to false to run without real hardware for development
|
||||||
real = True
|
real = False
|
||||||
skip_scanning = True
|
skip_scanning = True
|
||||||
|
|
||||||
mbconn = None
|
mbconn = None
|
||||||
@ -423,8 +423,9 @@ def setup_server(pool, manager):
|
|||||||
if sensor_ready is False:
|
if sensor_ready is False:
|
||||||
fprint("waiting for " + "Sensor Initialization" + " to complete...", sendqueue=to_server_queue)
|
fprint("waiting for " + "Sensor Initialization" + " to complete...", sendqueue=to_server_queue)
|
||||||
global mbconn
|
global mbconn
|
||||||
mbconn = ModbusClient(host="192.168.1.20", port=502, auto_open=False, auto_close=False)
|
if real:
|
||||||
get_sensors()
|
mbconn = ModbusClient(host="192.168.1.20", port=502, auto_open=False, auto_close=False)
|
||||||
|
get_sensors()
|
||||||
fprint("Sensors initialized.", sendqueue=to_server_queue)
|
fprint("Sensors initialized.", sendqueue=to_server_queue)
|
||||||
|
|
||||||
if camera_ready is False:
|
if camera_ready is False:
|
||||||
@ -772,7 +773,10 @@ def mainloop_server(pool, manager):
|
|||||||
else:
|
else:
|
||||||
global mainloop_get
|
global mainloop_get
|
||||||
#print("Checking sensors..")
|
#print("Checking sensors..")
|
||||||
newtube = get_sensors()
|
if real:
|
||||||
|
newtube = get_sensors()
|
||||||
|
else:
|
||||||
|
newtube = -1
|
||||||
if newtube >= 0:
|
if newtube >= 0:
|
||||||
# need to return a cable
|
# need to return a cable
|
||||||
mainloop_get.put(("return", newtube))
|
mainloop_get.put(("return", newtube))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user