1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Merge pull request #11122 from SteveCEvans/clracing_flash

Only call sdCardAndFSInit() when SD card is in use
This commit is contained in:
haslinghuis 2021-12-15 02:28:18 +01:00 committed by GitHub
commit 051cb68fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -600,7 +600,14 @@ void init(void)
ledInit(statusLedConfig());
#ifdef USE_SDCARD
sdCardAndFSInit();
if (blackboxConfig()->device == BLACKBOX_DEVICE_SDCARD) {
if (sdcardConfig()->mode) {
if (!(initFlags & SD_INIT_ATTEMPTED)) {
sdCardAndFSInit();
initFlags |= SD_INIT_ATTEMPTED;
}
}
}
#endif
#if defined(USE_FLASHFS)