mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Bsongis/ram saving (#6685)
RAM saving. Stacks reduced to have some more RAM available than 2.2 on all boards
This commit is contained in:
parent
ff2cde85be
commit
2d4e98d15d
28 changed files with 271 additions and 330 deletions
|
@ -490,24 +490,23 @@ void perMain()
|
|||
event_t evt = getEvent(false);
|
||||
|
||||
#if defined(RAMBACKUP)
|
||||
if (unexpectedShutdown) {
|
||||
if (globalData.unexpectedShutdown) {
|
||||
drawFatalErrorScreen(STR_EMERGENCY_MODE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
static bool sdcard_present_before = SD_CARD_PRESENT();
|
||||
bool sdcard_present_now = SD_CARD_PRESENT();
|
||||
if (sdcard_present_now && !sdcard_present_before) {
|
||||
bool sdcardPresent = SD_CARD_PRESENT();
|
||||
if (sdcardPresent && !globalData.sdcardPresent) {
|
||||
sdMount();
|
||||
}
|
||||
sdcard_present_before = sdcard_present_now;
|
||||
globalData.sdcardPresent = sdcardPresent;
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
// In case the SD card is removed during the session
|
||||
if (!SD_CARD_PRESENT() && !unexpectedShutdown) {
|
||||
if (!SD_CARD_PRESENT() && !globalData.unexpectedShutdown) {
|
||||
drawFatalErrorScreen(STR_NO_SDCARD);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue