1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

cc bl: allow bootloader to force safe-boot into firmware

This can be used by the GCS firmware uploader widget to boot
the firmware with a (temporarily) defaulted hwsettings uavo
so that a user can easily recover from a bad/incompatible
hwsettings configuration without wiping all settings.

This uses the same mechanism that the BootFault auto-recovery
code already uses in the CC firmware.  The auto-recovery is
triggered by setting the failed-boot counter to a maximum
value forcing recovery on the next FW init.
This commit is contained in:
Stacey Sheldon 2012-01-02 14:13:51 -05:00
parent 481a13609e
commit 4d2760f11d

View File

@ -294,6 +294,10 @@ void processComand(uint8_t *xReceive_Buffer) {
sendData(Buffer + 1, 63);
break;
case JumpFW:
if (Data == 0x5AFE) {
/* Force board into safe mode */
PIOS_IAP_WriteBootCount(0xFFFF);
}
FLASH_Lock();
JumpToApp = 1;
break;