Fixed following bug:

1. hit enter to go to banks menu.
2. hit escape.
3. hit enter again and radio does not announce banks menu because it was the last menu active.
Now reset the menu tracking variables on Escape.
This commit is contained in:
vk7js 2022-09-10 10:11:01 +10:00 committed by Silvano Seva
parent da7dfe63b2
commit d8fa0465fb
2 changed files with 10 additions and 1 deletions

View File

@ -117,6 +117,7 @@ extern void _ui_drawSettingsM17(ui_state_t* ui_state);
extern void _ui_drawSettingsVoicePrompts(ui_state_t* ui_state);
extern void _ui_drawSettingsReset2Defaults(ui_state_t* ui_state);
extern bool _ui_drawMacroMenu();
extern void _ui_reset_menu_anouncement_tracking();
const char *menu_items[] =
{
@ -1971,6 +1972,9 @@ void ui_updateFSM(bool *sync_rtx)
// to beep or you'll get an unwanted click.
if ((msg.keys &0xffff) && (state.settings.vpLevel == vpBeep))
vp_beep(750, 3);
// If we exit and re-enter the same menu, we want to ensure it speaks.
if (msg.keys & KEY_ESC)
_ui_reset_menu_anouncement_tracking();
}
else if(event.type == EVENT_STATUS)
{

View File

@ -58,6 +58,11 @@ const char *display_timer_values[] =
"45 min",
"1 hour"
};
void _ui_reset_menu_anouncement_tracking()
{
*priorSelectedMenuName='\0';
*priorSelectedMenuValue='\0';
}
static bool DidSelectedMenuItemChange(char* menuName, char* menuValue)
{
@ -113,7 +118,7 @@ static bool ScreenContainsReadOnlyEntries(int menuScreen)
}
return false;
}
static void announceMenuItemIfNeeded(char* name, char* value, bool editMode)
{
if (state.settings.vpLevel < vpLow)