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
+4 -4
View File
@@ -492,7 +492,7 @@ const char * FrskyDeviceFirmwareUpdate::flashFirmware(const char * filename)
drawProgressScreen(getBasename(filename), STR_DEVICE_RESET, 0, 0);
/* wait 2s off */
watchdogSuspend(2000);
watchdogSuspend(1000 /*10s*/);
RTOS_WAIT_MS(2000);
const char * result = doFlashFirmware(filename);
@@ -515,7 +515,7 @@ const char * FrskyDeviceFirmwareUpdate::flashFirmware(const char * filename)
SPORT_UPDATE_POWER_OFF();
/* wait 2s off */
watchdogSuspend(2000);
watchdogSuspend(500 /*5s*/);
RTOS_WAIT_MS(2000);
telemetryClearFifo();
@@ -756,7 +756,7 @@ const char * FrskyChipFirmwareUpdate::flashFirmware(const char * filename, bool
if (wait) {
/* wait 2s off */
watchdogSuspend(2000);
watchdogSuspend(1000 /*10s*/);
RTOS_WAIT_MS(2000);
}
@@ -776,7 +776,7 @@ const char * FrskyChipFirmwareUpdate::flashFirmware(const char * filename, bool
}
/* wait 2s off */
watchdogSuspend(2000);
watchdogSuspend(1000 /*10s*/);
RTOS_WAIT_MS(2000);
#if defined(HARDWARE_INTERNAL_MODULE)