Skip to content

Commit

Permalink
Notify user SD Card requires formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SumolX committed Sep 12, 2023
1 parent b1c7d90 commit 7b0bf58
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui/ui_statusbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "ui/page_storage.h"
#include "ui/page_wifi.h"
#include "ui/ui_style.h"
#include "util/sdcard.h"

///////////////////////////////////////////////////////////////////////////////
// local
Expand Down Expand Up @@ -222,8 +223,13 @@ void statubar_update(void) {
sprintf(buf, "%.2fGB available", gb);
}
} else {
sprintf(buf, "No SD card");
lv_img_set_src(img_sdc, &img_noSdcard);

if (sdcard_inserted()) {
sprintf(buf, "Format SD Card");
} else {
sprintf(buf, "No SD Card");
}
}

lv_label_set_text(label[STS_SDCARD], buf);
Expand Down

0 comments on commit 7b0bf58

Please sign in to comment.