mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Merge pull request #11122 from SteveCEvans/clracing_flash
Only call sdCardAndFSInit() when SD card is in use
This commit is contained in:
commit
051cb68fb6
1 changed files with 8 additions and 1 deletions
|
@ -600,7 +600,14 @@ void init(void)
|
||||||
ledInit(statusLedConfig());
|
ledInit(statusLedConfig());
|
||||||
|
|
||||||
#ifdef USE_SDCARD
|
#ifdef USE_SDCARD
|
||||||
|
if (blackboxConfig()->device == BLACKBOX_DEVICE_SDCARD) {
|
||||||
|
if (sdcardConfig()->mode) {
|
||||||
|
if (!(initFlags & SD_INIT_ATTEMPTED)) {
|
||||||
sdCardAndFSInit();
|
sdCardAndFSInit();
|
||||||
|
initFlags |= SD_INIT_ATTEMPTED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_FLASHFS)
|
#if defined(USE_FLASHFS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue