From dc589c96298df0c82d23bf9375a5724831ccdfae Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Sun, 17 Apr 2022 22:55:05 +0100 Subject: [PATCH] fix: change LED preference order This changes the Bluetooth LED to take precedence over the error LED Relates-to: #187 --- gatewayconfig/processors/led_processor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gatewayconfig/processors/led_processor.py b/gatewayconfig/processors/led_processor.py index 0f38c7f..f76c018 100644 --- a/gatewayconfig/processors/led_processor.py +++ b/gatewayconfig/processors/led_processor.py @@ -18,12 +18,12 @@ def run(self): if is_raspberry_pi() or is_rockpi(): while True: - # Blink fast if diagnostics are not OK - if(not self.shared_state.are_diagnostics_ok): - self.status_led.blink(0.1, 0.1, 10, False) # Blink slow if advertising bluetooth - elif(self.shared_state.is_advertising_bluetooth): + if(self.shared_state.is_advertising_bluetooth): self.status_led.blink(1, 1, 1, False) + # Blink fast if diagnostics are not OK + elif(not self.shared_state.are_diagnostics_ok): + self.status_led.blink(0.1, 0.1, 10, False) # Solid if diagnostics are OK and not advertising else: self.status_led.on()