mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +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:
parent
481a13609e
commit
4d2760f11d
@ -294,6 +294,10 @@ void processComand(uint8_t *xReceive_Buffer) {
|
|||||||
sendData(Buffer + 1, 63);
|
sendData(Buffer + 1, 63);
|
||||||
break;
|
break;
|
||||||
case JumpFW:
|
case JumpFW:
|
||||||
|
if (Data == 0x5AFE) {
|
||||||
|
/* Force board into safe mode */
|
||||||
|
PIOS_IAP_WriteBootCount(0xFFFF);
|
||||||
|
}
|
||||||
FLASH_Lock();
|
FLASH_Lock();
|
||||||
JumpToApp = 1;
|
JumpToApp = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user