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