In MENU_EDIT mode now the left encoder works as "back" button.

pull/15/head
Holger Wirtz 5 years ago
parent 9f1dafd399
commit 13de355800
  1. 31
      UI.hpp

@ -455,15 +455,7 @@ void lcdml_menu_control(void)
}
else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_R]) >= g_LCDML_CONTROL_button_long_press)
{
LCDML.BT_quit();
if (menu_state == MENU_EDIT)
{
LCDML.BT_quit();
}
else if (menu_state == MENU_VOICE)
{
encoder_right_button_long();
}
encoder_right_button_long();
}
else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_R]) >= g_LCDML_CONTROL_button_short_press)
{
@ -662,10 +654,9 @@ void encoder_right_down(void)
void encoder_right_button_long(void)
{
#ifdef DEBUG
Serial.println(F("State: MENU_VOICE, button long press"));
#else
;
Serial.println(F("Encoder right long press"));
#endif
LCDML.BT_quit();
}
void encoder_right_button_short(void)
@ -724,9 +715,17 @@ void encoder_left_button_long(void)
{
#ifdef DEBUG
Serial.println(F("Encoder left long press"));
#else
;
#endif
if (menu_state == MENU_EDIT)
{
menu_state = MENU_VOICE;
UI_func_voice_selection(0);
}
else if (menu_state == MENU_VOICE)
{
menu_state = MENU_EDIT;
LCDML.MENU_goRoot();
}
}
void encoder_left_button_short(void)
@ -736,8 +735,8 @@ void encoder_left_button_short(void)
#endif
if (menu_state == MENU_EDIT)
{
menu_state = MENU_VOICE;
UI_func_voice_selection(0);
//LCDML.FUNC_goBackToMenu();
LCDML.BT_quit();
}
else if (menu_state == MENU_VOICE)
{

Loading…
Cancel
Save