[SC64][SW] controller: fixed stuck LED state when error was cleared

This commit is contained in:
Mateusz Faderewski 2024-05-20 16:18:14 +02:00
parent 80c06f3e53
commit 9843a79a86

View File

@ -56,10 +56,7 @@ void led_blink_error (led_error_t error) {
break;
}
error_active = (
cic_error |
rtc_error
);
error_active = true;
}
void led_clear_error (led_error_t error) {
@ -72,17 +69,6 @@ void led_clear_error (led_error_t error) {
rtc_error = false;
break;
}
error_active = (
cic_error |
rtc_error
);
if (!error_active) {
activity_pulse = false;
activity_pulse_timer = 0;
error_timer = 0;
}
}
@ -105,6 +91,13 @@ void led_process (void) {
blinks = CIC_ERROR_BLINKS;
} else if (rtc_error) {
blinks = RTC_ERROR_BLINKS;
} else {
activity_pulse = false;
activity_pulse_timer = 0;
error_active = false;
error_timer = 0;
hw_gpio_reset(GPIO_ID_LED);
return;
}
bool led_on = false;