Hooked up repeat last voice prompt and summary to f1 if vpLevel is higher than beep.

This commit is contained in:
vk7js 2022-05-17 21:36:57 +10:00 committed by Silvano Seva
parent 8fab0b1e8c
commit 07d971ecfb
2 changed files with 26 additions and 6 deletions

View File

@ -155,7 +155,7 @@ void anouncePower(float power, VoicePromptQueueFlags_T flags)
vpInitIfNeeded(flags);
char buffer[16] = "\0";
//joe
if (flags & vpqIncludeDescriptions)
vpQueuePrompt(PROMPT_POWER);
@ -177,8 +177,12 @@ VoicePromptQueueFlags_T flags)
VoicePromptQueueFlags_T localFlags=flags & ~(vpqInit | vpqPlayImmediately);
if (state.settings.vpLevel == vpHigh)
localFlags |= vpqIncludeDescriptions;
announceChannelName(channel, channelIndex, localFlags);
// if VFO mode, announce VFO.
// channelIndex will be 0 if called from VFO mode.
if (channelIndex == 0)
vpQueuePrompt(PROMPT_VFO);
else
announceChannelName(channel, channelIndex, localFlags);
announceFrequencies(channel->rx_frequency , channel->tx_frequency, localFlags);
announceRadioMode(channel->mode, localFlags);

View File

@ -1035,7 +1035,7 @@ void ui_updateFSM(bool *sync_rtx)
{
kbd_msg_t msg;
msg.value = event.payload;
bool f1Handled = false;
// If we get out of standby, we ignore the kdb event
// unless is the MONI key for the MACRO functions
if (_ui_exitStandby(now) && !(msg.keys & KEY_MONI))
@ -1158,7 +1158,7 @@ void ui_updateFSM(bool *sync_rtx)
ui_state.input_number = input_getPressedNumber(msg);
// Calculate portion of the new frequency
ui_state.new_rx_frequency = _ui_freq_add_digit(ui_state.new_rx_frequency,
ui_state.input_position, ui_state.input_number);
ui_state.input_position, ui_state.input_number);
}
}
break;
@ -1218,6 +1218,18 @@ void ui_updateFSM(bool *sync_rtx)
else if(msg.keys & KEY_ESC)
// Discard selected dst ID and disable input mode
ui_state.edit_mode = false;
else if(msg.keys & KEY_F1)
{
if (state.settings.vpLevel > vpBeep)
{// quick press repeat vp, long press summary.
if (msg.long_press)
announceChannelSummary(&state.channel, state.channel_index,
(vpqInit|vpqPlayImmediately));
else
ReplayLastPrompt();
f1Handled=true;
}
}
else if(msg.keys & KEY_UP || msg.keys & KEY_DOWN ||
msg.keys & KEY_LEFT || msg.keys & KEY_RIGHT)
_ui_textInputDel(ui_state.new_callsign);
@ -1243,7 +1255,6 @@ void ui_updateFSM(bool *sync_rtx)
*sync_rtx = true;
// Switch to VFO screen
state.ui_screen = MAIN_VFO;
announceVFO();
}
else if(msg.keys & KEY_HASH)
{
@ -1657,6 +1668,11 @@ void ui_updateFSM(bool *sync_rtx)
}
break;
}
if (!f1Handled && (msg.keys & KEY_F1) && (state.settings.vpLevel > vpBeep))
{
ReplayLastPrompt();
}
}
else if(event.type == EVENT_STATUS)
{