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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user