About GUI menu: Improve rotary handling
This commit is contained in:
parent
20fd7b41e6
commit
7b426c93c9
@ -127,6 +127,21 @@ static void reflow_menu_about(struct lcd_menu *menu, enum menu_entry_func_entry
|
||||
menu_ack_rotary_delta(menu);
|
||||
}
|
||||
|
||||
rot_delta = menu_get_rotary_delta(menu);
|
||||
if (rot_delta >= 4) {
|
||||
menu_ack_rotary_delta(menu);
|
||||
if (page < 4) {
|
||||
page++;
|
||||
menu_display_clear(menu);
|
||||
}
|
||||
} else if (rot_delta <= -4) {
|
||||
menu_ack_rotary_delta(menu);
|
||||
if (page > 0) {
|
||||
page--;
|
||||
menu_display_clear(menu);
|
||||
}
|
||||
}
|
||||
|
||||
switch (page) {
|
||||
case 0:
|
||||
menu_lcd_output(menu, 0, LCD_SHIMATTA_STRING " Shimatta");
|
||||
@ -171,21 +186,6 @@ static void reflow_menu_about(struct lcd_menu *menu, enum menu_entry_func_entry
|
||||
break;
|
||||
}
|
||||
|
||||
rot_delta = menu_get_rotary_delta(menu);
|
||||
if (rot_delta >= 4) {
|
||||
menu_ack_rotary_delta(menu);
|
||||
if (page < 4) {
|
||||
page++;
|
||||
menu_display_clear(menu);
|
||||
}
|
||||
} else if (rot_delta <= -4) {
|
||||
menu_ack_rotary_delta(menu);
|
||||
if (page > 0) {
|
||||
page--;
|
||||
menu_display_clear(menu);
|
||||
}
|
||||
}
|
||||
|
||||
push_button = menu_get_button_state(menu);
|
||||
|
||||
if (push_button == BUTTON_IDLE)
|
||||
|
Loading…
Reference in New Issue
Block a user