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:
parent
ea0df5d1a1
commit
09904b2206
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue