Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed 'sd_info' showing incorrect information when SD card not configured. #8849

Merged
merged 1 commit into from Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/cli/cli.c
Expand Up @@ -2319,6 +2319,12 @@ static void cliSdInfo(char *cmdline)

cliPrint("SD card: ");

if (sdcardConfig()->mode == SDCARD_MODE_NONE) {
cliPrintLine("Not configured");

return;
}

if (!sdcard_isInserted()) {
cliPrintLine("None inserted");
return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/msp/msp.c
Expand Up @@ -319,7 +319,7 @@ static void serializeSDCardSummaryReply(sbuf_t *dst)
uint32_t totalSpace = 0;

#if defined(USE_SDCARD)
if (sdcardConfig()->mode) {
if (sdcardConfig()->mode != SDCARD_MODE_NONE) {
flags = MSP_SDCARD_FLAG_SUPPORTED;

// Merge the card and filesystem states together
Expand Down