Fix #46: Add SD status to GUI

This commit is contained in:
Mario Hüttel 2022-12-31 20:22:41 +01:00
parent ec2d3da4cb
commit b18186423f

View File

@ -22,6 +22,7 @@
#include <reflow-controller/ui/gui-config.h> #include <reflow-controller/ui/gui-config.h>
#include <reflow-controller/ui/menu.h> #include <reflow-controller/ui/menu.h>
#include <reflow-controller/ui/lcd.h> #include <reflow-controller/ui/lcd.h>
#include <reflow-controller/sd.h>
#include <reflow-controller/ui/rotary-encoder.h> #include <reflow-controller/ui/rotary-encoder.h>
#include <reflow-controller/systick.h> #include <reflow-controller/systick.h>
#include <reflow-controller/adc-meas.h> #include <reflow-controller/adc-meas.h>
@ -789,7 +790,7 @@ static void gui_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_entr
if (entry_type != MENU_ENTRY_CONTINUE) { if (entry_type != MENU_ENTRY_CONTINUE) {
menu_changed = true; menu_changed = true;
menu_display_clear(menu); menu_display_clear(menu);
update_display_buffer(0, "Main Menu"); update_display_buffer(0, sd_card_is_mounted() ? "Main Menu [SD]" : "Main Menu [--]");
menu_ack_rotary_delta(menu); menu_ack_rotary_delta(menu);
if (entry_type == MENU_ENTRY_FIRST_ENTER) { if (entry_type == MENU_ENTRY_FIRST_ENTER) {
list.entry_names = root_entry_names; list.entry_names = root_entry_names;