Fix simulation mode
This commit is contained in:
parent
48e7c7b85f
commit
3fb78f8b5a
6
run.py
6
run.py
@ -37,7 +37,7 @@ import time
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
# 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
|
||||||
@ -542,6 +542,8 @@ def get_sensors():
|
|||||||
global mbconn
|
global mbconn
|
||||||
global sensors
|
global sensors
|
||||||
#print("Reading sensors")
|
#print("Reading sensors")
|
||||||
|
if not real:
|
||||||
|
return -1
|
||||||
if not mbconn.is_open:
|
if not mbconn.is_open:
|
||||||
mbconn.open()
|
mbconn.open()
|
||||||
"""
|
"""
|
||||||
@ -739,7 +741,7 @@ def mainloop_server(pool, manager):
|
|||||||
if ring_animation is not None and real:
|
if ring_animation is not None and real:
|
||||||
ledsys.mainloop(None, ring_animation, arm_position=arm_position)
|
ledsys.mainloop(None, ring_animation, arm_position=arm_position)
|
||||||
|
|
||||||
else:
|
elif real:
|
||||||
ledsys.mainloop(None, -1, arm_position=arm_position)
|
ledsys.mainloop(None, -1, arm_position=arm_position)
|
||||||
|
|
||||||
# every 1 second
|
# every 1 second
|
||||||
|
Loading…
x
Reference in New Issue
Block a user