Fixed voice prompt bugs

Fixed following voice prompt bugs:
1. Now say OpenRTX when powering on if vp enabled to let user know radio is on.
2. When switching back to VFO or channel mode from menus, now anounce VFO info or channel info.
3. When entering first digit of frequency in VFO input mode, say it.
4. Refixed issue of concatenating menus rather than clearing menu.
md1702
Silvano Seva 2022-08-29 21:35:44 +02:00
rodzic 1383e3d61e
commit d81a4220d1
3 zmienionych plików z 28 dodań i 3 usunięć

Wyświetl plik

@ -279,6 +279,12 @@ void vp_init()
// Initialize codec2 module
codec_init();
if (state.settings.vpLevel > vpBeep)
{
vp_queueStringTableEntry(&currentLanguage->openRTX);
vp_play();
}
}
void vp_terminate()

Wyświetl plik

@ -1169,6 +1169,8 @@ void ui_updateFSM(bool *sync_rtx)
{
macro_menu = false;
}
int priorUIScreen = state.ui_screen;
switch(state.ui_screen)
{
// VFO screen
@ -1905,6 +1907,20 @@ void ui_updateFSM(bool *sync_rtx)
{
vp_replayLastPrompt();
}
else if ((priorUIScreen!=state.ui_screen) && state.settings.vpLevel > vpLow)
{
// When we switch to VFO or Channel screen, we need to announce it.
// All other cases are handled as needed.
if (state.ui_screen == MAIN_VFO)
{
vp_announceChannelSummary(&state.channel, 0, state.bank);
}
else if (state.ui_screen == MAIN_MEM)
{
vp_announceChannelSummary(&state.channel, state.channel_index,
state.bank);
}
}
}
else if(event.type == EVENT_STATUS)
{

Wyświetl plik

@ -103,14 +103,17 @@ static void announceMenuItemIfNeeded(char* name, char* value)
// prompt if arrowing rapidly.
bool voicePromptWasPlaying = vp_isPlaying();
// Stop any prompt in progress and clear the buffer.
if (voicePromptWasPlaying)
vp_clearCurrPrompt();
// Stop any prompt in progress and/or clear the buffer.
vp_clearCurrPrompt();
// If no value is supplied, or, no prompt is in progress, announce the name.
if ((voicePromptWasPlaying == false) || (value == NULL) || (*value == '\0'))
vp_announceText(name, vpqDefault);
// This is a top-level menu rather than a menu/value pair.
if (value == NULL)
vp_queueStringTableEntry(&currentLanguage->menu);
if ((value != NULL) && (*value != '\0'))
vp_announceText(value, vpqDefault);