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 -3
View File
@@ -561,8 +561,7 @@ void checkSwitches()
bool refresh = false;
#endif
while (1) {
while (true) {
#if defined(PCBTARANIS) || defined(PCBHORUS)
#define GETADC_COUNT 1
#endif
@@ -749,6 +748,8 @@ void checkSwitches()
#if defined(PWR_BUTTON_PRESS)
uint32_t power = pwrCheck();
if (power == e_power_off) {
drawSleepBitmap();
boardOff();
break;
}
else if (power == e_power_press) {
@@ -767,7 +768,7 @@ void checkSwitches()
doLoopCommonActions();
wdt_reset();
WDG_RESET();
RTOS_WAIT_MS(10);
}