mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
Fixed 'sd_info' showing incorrect information when SD card not configured.
This commit is contained in:
parent
ab4328f293
commit
7018c81bf1
2 changed files with 7 additions and 1 deletions
|
@ -2319,6 +2319,12 @@ static void cliSdInfo(char *cmdline)
|
||||||
|
|
||||||
cliPrint("SD card: ");
|
cliPrint("SD card: ");
|
||||||
|
|
||||||
|
if (sdcardConfig()->mode == SDCARD_MODE_NONE) {
|
||||||
|
cliPrintLine("Not configured");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!sdcard_isInserted()) {
|
if (!sdcard_isInserted()) {
|
||||||
cliPrintLine("None inserted");
|
cliPrintLine("None inserted");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -319,7 +319,7 @@ static void serializeSDCardSummaryReply(sbuf_t *dst)
|
||||||
uint32_t totalSpace = 0;
|
uint32_t totalSpace = 0;
|
||||||
|
|
||||||
#if defined(USE_SDCARD)
|
#if defined(USE_SDCARD)
|
||||||
if (sdcardConfig()->mode) {
|
if (sdcardConfig()->mode != SDCARD_MODE_NONE) {
|
||||||
flags = MSP_SDCARD_FLAG_SUPPORTED;
|
flags = MSP_SDCARD_FLAG_SUPPORTED;
|
||||||
|
|
||||||
// Merge the card and filesystem states together
|
// Merge the card and filesystem states together
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue