update start light
This commit is contained in:
parent
67d156d3f4
commit
90da7e3d73
|
@ -61,12 +61,12 @@ class OrangePi(BaseHardware):
|
||||||
hd_threads = [threading.Thread(target=self.hd_detection_loop)]
|
hd_threads = [threading.Thread(target=self.hd_detection_loop)]
|
||||||
for hd_thread in hd_threads:
|
for hd_thread in hd_threads:
|
||||||
hd_thread.start()
|
hd_thread.start()
|
||||||
self.start_status_light()
|
|
||||||
|
|
||||||
def hd_detection_loop(self):
|
def hd_detection_loop(self):
|
||||||
last_status_1 = False
|
last_status_1 = False
|
||||||
press_time_1 = None
|
press_time_1 = None
|
||||||
|
|
||||||
|
self.start_status_light()
|
||||||
while True:
|
while True:
|
||||||
button_status_1 = wiringpi.digitalRead(self.BUTTON_PIN_1)
|
button_status_1 = wiringpi.digitalRead(self.BUTTON_PIN_1)
|
||||||
if not button_status_1 and last_status_1:
|
if not button_status_1 and last_status_1:
|
||||||
|
|
Loading…
Reference in New Issue