diff --git a/main.c b/main.c index b57f78e5..f5955274 100644 --- a/main.c +++ b/main.c @@ -97,7 +97,7 @@ static volatile vna_shellcmd_t shell_function = 0; // Enable usart command #define ENABLE_USART_COMMAND // Enable SD card console command -//#define ENABLE_SD_CARD_CMD +#define ENABLE_SD_CARD_CMD static void apply_CH0_error_term_at(int i); static void apply_CH1_error_term_at(int i); diff --git a/nanovna.h b/nanovna.h index 867f7b79..432b93ae 100644 --- a/nanovna.h +++ b/nanovna.h @@ -40,7 +40,7 @@ // Add SD card support, req enable RTC (additional settings for file system see FatFS lib ffconf.h) #define __USE_SD_CARD__ // Allow run commands from SD card (config.ini in root) -//#define __SD_CARD_LOAD__ +#define __SD_CARD_LOAD__ // If enabled serial in halconf.h, possible enable serial console control #define __USE_SERIAL_CONSOLE__ // Add LC match function diff --git a/ui.c b/ui.c index 0237c981..3c85f6a3 100644 --- a/ui.c +++ b/ui.c @@ -1836,12 +1836,13 @@ static void drawMessageBox(char *header, char *text, uint32_t delay){ } static void -draw_keypad(void) +draw_keypad(uint32_t mask) { - int i = 0; + int i; button_t button; button.fg = LCD_MENU_TEXT_COLOR; - do { + for(i = 0; keypads[i].c != KP_NONE; i++) { + if ((mask&(1< keypads_last_index) selection = 0; - draw_keypad(); - chThdSleepMilliseconds(200); + draw_keypad(mask|(1<