From 09904b22062bed66a8ed209bef28e14cd812e8ea Mon Sep 17 00:00:00 2001 From: Nicholas Sherlock Date: Wed, 2 Dec 2015 23:00:00 +1300 Subject: [PATCH] Better reporting of fatal SD card states --- src/main/io/serial_msp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index d5f3c255a2..56febd6edc 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -580,8 +580,10 @@ static void serializeSDCardSummaryReply(void) serialize8(flags); // Merge the card and filesystem states together - if (!sdcard_isInserted() || !sdcard_isFunctional()) { + if (!sdcard_isInserted()) { state = MSP_SDCARD_STATE_NOT_PRESENT; + } else if (!sdcard_isFunctional()) { + state = MSP_SDCARD_STATE_FATAL; } else { switch (afatfs_getFilesystemState()) { case AFATFS_FILESYSTEM_STATE_READY: