1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-25 17:25:10 +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:
Bertrand Songis 2019-08-30 15:46:57 +02:00 committed by GitHub
parent ff2cde85be
commit 2d4e98d15d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 271 additions and 330 deletions

View file

@ -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;
}