Update code for release v0.9.1

This commit is contained in:
IrvingGao committed 2024-07-15 14:53:50 +08:00
1 parent d15f5a55cb
commit 77ad5887d0
4 files changed
+27 -63

No files matched your search

+4 -2
View File
@@ -25,8 +25,9 @@ except:
'''
class OrangePi(BaseHardware):
def __init__(self, hd_trigger='button', hd_detect_threshold=50):
def __init__(self, hd_trigger='button', hd_detect_threshold=50, enable_start_light=False):
super().__init__(hd_trigger, hd_detect_threshold)
self.enable_start_light = enable_start_light
self.LED_PIN_red = 0
self.LED_PIN_blue = 1
@@ -68,7 +69,8 @@ class OrangePi(BaseHardware):
last_status_1 = False
press_time_1 = None
self.start_status_light()
if self.enable_start_light:
self.start_status_light()
while True:
button_status_1 = True if wiringpi.digitalRead(self.BUTTON_PIN_1) == 0 else False
# print(f"{datetime.now()}: BUTTON_PIN_1: {wiringpi.digitalRead(self.BUTTON_PIN_1)}")