1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 23:05:19 +03:00

Better reporting of fatal SD card states

This commit is contained in:
Nicholas Sherlock 2015-12-02 23:00:00 +13:00 committed by borisbstyle
parent ea0df5d1a1
commit 09904b2206

View file

@ -580,8 +580,10 @@ static void serializeSDCardSummaryReply(void)
serialize8(flags); serialize8(flags);
// Merge the card and filesystem states together // Merge the card and filesystem states together
if (!sdcard_isInserted() || !sdcard_isFunctional()) { if (!sdcard_isInserted()) {
state = MSP_SDCARD_STATE_NOT_PRESENT; state = MSP_SDCARD_STATE_NOT_PRESENT;
} else if (!sdcard_isFunctional()) {
state = MSP_SDCARD_STATE_FATAL;
} else { } else {
switch (afatfs_getFilesystemState()) { switch (afatfs_getFilesystemState()) {
case AFATFS_FILESYSTEM_STATE_READY: case AFATFS_FILESYSTEM_STATE_READY: