Prevent uneeded unmount!:mount f already mounted of sdcard (#6986)
Prevent double SD mount on Horus
This commit is contained in:
+1
-3
@@ -502,11 +502,9 @@ void perMain()
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
bool sdcardPresent = SD_CARD_PRESENT();
|
||||
if (sdcardPresent && !globalData.sdcardPresent) {
|
||||
if (SD_CARD_PRESENT() && !sdMounted()) {
|
||||
sdMount();
|
||||
}
|
||||
globalData.sdcardPresent = sdcardPresent;
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
|
||||
@@ -1859,8 +1859,6 @@ void opentxInit()
|
||||
}
|
||||
|
||||
#if defined(SDCARD)
|
||||
globalData.sdcardPresent = SD_CARD_PRESENT();
|
||||
|
||||
// SDCARD related stuff, only done if not unexpectedShutdown
|
||||
if (!globalData.unexpectedShutdown) {
|
||||
sdInit();
|
||||
|
||||
+1
-2
@@ -569,9 +569,8 @@ void flightReset(uint8_t check=true);
|
||||
|
||||
PACK(struct GlobalData {
|
||||
uint8_t unexpectedShutdown:1;
|
||||
uint8_t sdcardPresent:1;
|
||||
uint8_t externalAntennaEnabled: 1;
|
||||
uint8_t spare:5;
|
||||
uint8_t spare:6;
|
||||
});
|
||||
|
||||
extern GlobalData globalData;
|
||||
|
||||
Reference in New Issue
Block a user