MAGIC value for powerReason should be stored in RTC backup on Horus (#7096)

- Allows the radio main application to start correctly when coming from an app in RAM
- Refactoring of the `UNEXPECTED_SHUTDOWN()` process
- Saves the RTC battery as BACKUP RAM is not needed on normal shutdown
- On PWR OFF on an ALERT, the radio won't show the next alert before shutting down
- Bootloader flashable through the SD Manager
This commit is contained in:
Bertrand Songis
2019-11-21 11:50:33 +01:00
committed by GitHub
parent 103534bdcf
commit 4cdd17f0d7
41 changed files with 235 additions and 190 deletions
+11
View File
@@ -159,6 +159,10 @@ void onSdManagerMenu(const char * result)
getSelectionFullPath(lfn);
pushMenuTextView(lfn);
}
else if (result == STR_FLASH_BOOTLOADER) {
getSelectionFullPath(lfn);
bootloaderFlash(lfn);
}
else if (result == STR_FLASH_INTERNAL_MODULE) {
getSelectionFullPath(lfn);
FrskyDeviceFirmwareUpdate device(INTERNAL_MODULE);
@@ -278,6 +282,13 @@ bool menuRadioSdManager(event_t _event)
POPUP_MENU_ADD_ITEM(STR_ASSIGN_SPLASH);
}
}
if (!READ_ONLY() && !strcasecmp(ext, FIRMWARE_EXT)) {
TCHAR lfn[_MAX_LFN+1];
getSelectionFullPath(lfn);
if (isBootloader(lfn)) {
POPUP_MENU_ADD_ITEM(STR_FLASH_BOOTLOADER);
}
}
else if (!READ_ONLY() && !strcasecmp(ext, SPORT_FIRMWARE_EXT)) {
if (HAS_SPORT_UPDATE_CONNECTOR())
POPUP_MENU_ADD_ITEM(STR_FLASH_EXTERNAL_DEVICE);