1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Toggle all LEDs for hard-faults.

* If they all flash yo have a better chance of finding it.
* Boards with only 1 LED (LED0) had no indication of failure.
This commit is contained in:
Dominic Clifton 2019-02-19 18:03:56 +01:00
parent fefa2a83e4
commit 456ebfa9be

View file

@ -125,6 +125,8 @@ void hard_fault_handler_c(unsigned long *hardfault_args)
#else
void HardFault_Handler(void)
{
LED0_ON;
LED1_ON;
LED2_ON;
// fall out of the sky
@ -141,11 +143,14 @@ void HardFault_Handler(void)
}
#endif
LED1_OFF;
LED0_OFF;
LED1_OFF;
LED2_OFF;
while (1) {
delay(50);
LED0_TOGGLE;
LED1_TOGGLE;
LED2_TOGGLE;
}
}