mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
[Horus] SD hot mount if removed when the radio is ON
This commit is contained in:
parent
90e8748e12
commit
830593d62e
14 changed files with 27 additions and 7 deletions
|
@ -413,19 +413,26 @@ void perMain()
|
|||
|
||||
#if defined(RAMBACKUP)
|
||||
if (unexpectedShutdown) {
|
||||
lcd->clear();
|
||||
lcdDrawText(LCD_W/2, LCD_H/2-20, "EMERGENCY MODE", DBLSIZE|CENTERED|TEXT_BGCOLOR);
|
||||
lcdRefresh();
|
||||
drawFatalErrorScreen(STR_EMERGENCY_MODE);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
// TODO if it is OK on HORUS it could be ported to all other boards
|
||||
// But in this case it's needed to define sdMount for all boards, because sdInit also initializes the SD mutex
|
||||
static uint32_t sdcard_present_before = SD_CARD_PRESENT();
|
||||
uint32_t sdcard_present_now = SD_CARD_PRESENT();
|
||||
if (sdcard_present_now && !sdcard_present_before) {
|
||||
sdMount();
|
||||
}
|
||||
sdcard_present_before = sdcard_present_now;
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
// In case the SD card is removed during the session
|
||||
if (!SD_CARD_PRESENT()) {
|
||||
lcd->clear();
|
||||
lcdDrawText(LCD_W/2, LCD_H/2-20, STR_NO_SDCARD, DBLSIZE|CENTERED|TEXT_BGCOLOR);
|
||||
lcdRefresh();
|
||||
drawFatalErrorScreen(STR_NO_SDCARD);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -493,6 +493,7 @@ const pm_char STR_SWITCHWARN[] PROGMEM = TR_SWITCHWARN;
|
|||
const pm_char STR_FAILSAFEWARN[] PROGMEM = TR_FAILSAFEWARN;
|
||||
const pm_char STR_WRONG_SDCARDVERSION[] PROGMEM = TR_WRONG_SDCARDVERSION;
|
||||
const pm_char STR_WRONG_PCBREV[] PROGMEM = TR_WRONG_PCBREV;
|
||||
const pm_char STR_EMERGENCY_MODE[] PROGMEM = TR_EMERGENCY_MODE;
|
||||
const pm_char STR_PCBREV_ERROR[] PROGMEM = TR_PCBREV_ERROR;
|
||||
const pm_char STR_NO_FAILSAFE[] PROGMEM = TR_NO_FAILSAFE;
|
||||
const pm_char STR_KEYSTUCK[] PROGMEM = TR_KEYSTUCK;
|
||||
|
|
|
@ -708,6 +708,7 @@ extern const pm_char STR_SWITCHWARN[];
|
|||
extern const pm_char STR_FAILSAFEWARN[];
|
||||
extern const pm_char STR_WRONG_SDCARDVERSION[];
|
||||
extern const pm_char STR_WRONG_PCBREV[];
|
||||
extern const pm_char STR_EMERGENCY_MODE[];
|
||||
extern const pm_char STR_PCBREV_ERROR[];
|
||||
extern const pm_char STR_NO_FAILSAFE[];
|
||||
extern const pm_char STR_KEYSTUCK[];
|
||||
|
|
|
@ -915,6 +915,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe není nastaveno"
|
||||
#define TR_KEYSTUCK "Zaseklá klávesa"
|
||||
|
|
|
@ -934,6 +934,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE TR("Failsafe not set", "Failsafe nicht programmiert")
|
||||
#define TR_KEYSTUCK "Taste klemmt" //Key stuck=Taste klemmt
|
||||
|
|
|
@ -900,6 +900,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe not set"
|
||||
#define TR_KEYSTUCK "Key stuck"
|
||||
|
|
|
@ -879,6 +879,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe not set"
|
||||
#define TR_KEYSTUCK "Key stuck"
|
||||
|
|
|
@ -879,6 +879,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe not set"
|
||||
#define TR_KEYSTUCK "Key stuck"
|
||||
|
|
|
@ -911,6 +911,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Version des fichiers incompatible"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe pas déf."
|
||||
#define TR_KEYSTUCK "Touche bloquée"
|
||||
|
|
|
@ -914,6 +914,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe non settato"
|
||||
#define TR_KEYSTUCK "Tasto bloccato"
|
||||
|
|
|
@ -928,6 +928,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE TR("Failsafe niet ing.", "Failsafe niet ingesteld")
|
||||
#define TR_KEYSTUCK "Toets klemt"
|
||||
|
|
|
@ -916,6 +916,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Brak Failsafe"
|
||||
#define TR_KEYSTUCK "Blokada klucza"
|
||||
|
|
|
@ -874,6 +874,7 @@
|
|||
#define TR_FAILSAFEWARN "FAILSAFE"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong files version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe not set"
|
||||
#define TR_KEYSTUCK "Key stuck"
|
||||
|
|
|
@ -928,6 +928,7 @@
|
|||
#define TR_SDCARDVERSIONWARN "SD Card Check"
|
||||
#define TR_WRONG_SDCARDVERSION "Wrong SDCARD file version"
|
||||
#define TR_WRONG_PCBREV "Wrong PCB detected"
|
||||
#define TR_EMERGENCY_MODE "EMERGENCY MODE"
|
||||
#define TR_PCBREV_ERROR "PCB error"
|
||||
#define TR_NO_FAILSAFE "Failsafe ej given"
|
||||
#define TR_KEYSTUCK "Knapp-fel"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue