Add about command to menu and restructure code. Delete preliminary code from mainloop. Better code will follow

This commit is contained in:
2020-06-13 22:47:45 +02:00
parent e627cb67a5
commit a6dc4f9b46
10 changed files with 122 additions and 94 deletions

View File

@@ -393,7 +393,7 @@ enum lcd_fsm_ret lcd_fsm_write_buffer(const char (*display_buffer)[21])
state_cnt++;
break;
case 4:
if (!systick_ticks_have_passed(timestamp, 5)) {
if (!systick_ticks_have_passed(timestamp, 4)) {
ret = LCD_FSM_WAIT_CALL;
} else {
ret = LCD_FSM_WAIT_CALL;

View File

@@ -174,6 +174,24 @@ void menu_list_scroll_down(struct menu_list *list)
}
}
void menu_list_enter_selected_entry(struct menu_list *list, struct lcd_menu *menu)
{
menu_func_t entry;
if (!list)
return;
if (!list->submenu_list)
return;
entry = list->submenu_list[list->currently_selected];
if (!entry)
return;
menu_entry_enter(menu, entry, false);
}
void menu_list_scroll_up(struct menu_list *list)
{
if (!list)