mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Cleanup sdcard info messaging.
This commit is contained in:
parent
8f461b3942
commit
7f398cbe4b
1 changed files with 7 additions and 7 deletions
|
@ -1506,15 +1506,15 @@ static void cliSdShowError(char *message, SD_Error error)
|
||||||
static void cliSdInfo(char *cmdline) {
|
static void cliSdInfo(char *cmdline) {
|
||||||
UNUSED(cmdline);
|
UNUSED(cmdline);
|
||||||
|
|
||||||
SD_Error error;
|
|
||||||
|
|
||||||
uint8_t sdPresent = SD_Detect();
|
uint8_t sdPresent = SD_Detect();
|
||||||
cliPrintf("sdcard %s\n", sdPresent == SD_PRESENT ? "PRESENT" : "NOT PRESENT");
|
if (sdPresent != SD_PRESENT) {
|
||||||
|
cliPrint("sd card not present\r\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (sdPresent == SD_PRESENT) {
|
SD_Error error;
|
||||||
error = SD_Init();
|
error = SD_Init();
|
||||||
cliSdShowError("SD init result", error);
|
cliSdShowError("SD init result", error);
|
||||||
}
|
|
||||||
|
|
||||||
SD_CardInfo cardInfo;
|
SD_CardInfo cardInfo;
|
||||||
memset(&cardInfo, 0, sizeof(cardInfo));
|
memset(&cardInfo, 0, sizeof(cardInfo));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue