update start light

This commit is contained in:
IrvingGao committed 2024-05-27 23:47:05 +08:00
1 parent 70ba63b7e8
commit 67d156d3f4
2 files changed
+8 -13

No files matched your search

+8
View File
@@ -61,6 +61,7 @@ class OrangePi(BaseHardware):
hd_threads = [threading.Thread(target=self.hd_detection_loop)]
for hd_thread in hd_threads:
hd_thread.start()
self.start_status_light()
def hd_detection_loop(self):
last_status_1 = False
@@ -101,6 +102,13 @@ class OrangePi(BaseHardware):
def set_led_off(self, color='red'):
wiringpi.digitalWrite(getattr(self, f'LED_PIN_{color}'), GPIO.LOW)
def start_status_light(self):
for i in range(2):
self.set_led_on("green")
time.sleep(0.5)
self.set_led_off("green")
time.sleep(0.5)
if __name__ == '__main__':
orangepi = OrangePi()