1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Cleanup sdcard info messaging.

This commit is contained in:
Dominic Clifton 2015-09-14 22:27:15 +01:00 committed by borisbstyle
parent 8f461b3942
commit 7f398cbe4b

View file

@ -1506,16 +1506,16 @@ static void cliSdShowError(char *message, SD_Error error)
static void cliSdInfo(char *cmdline) {
UNUSED(cmdline);
SD_Error error;
uint8_t sdPresent = SD_Detect();
cliPrintf("sdcard %s\n", sdPresent == SD_PRESENT ? "PRESENT" : "NOT PRESENT");
if (sdPresent == SD_PRESENT) {
error = SD_Init();
cliSdShowError("SD init result", error);
if (sdPresent != SD_PRESENT) {
cliPrint("sd card not present\r\n");
return;
}
SD_Error error;
error = SD_Init();
cliSdShowError("SD init result", error);
SD_CardInfo cardInfo;
memset(&cardInfo, 0, sizeof(cardInfo));
error = SD_GetCardInfo(&cardInfo);