Now play generic beep on any key press as well as different tones when navigating the menu, when menu item wraps, and when function key latches and unlatches if voice prompt level is set to beep.
This commit is contained in:
parent
a1e302b19d
commit
eb89f5a55a
|
|
@ -914,8 +914,8 @@ void vp_playMenuBeepIfNeeded(bool firstItem)
|
|||
if (state.settings.vpLevel < vpBeep)
|
||||
return;
|
||||
if (firstItem)
|
||||
vp_beep(500, 5);
|
||||
vp_beep(500, 3);
|
||||
else
|
||||
vp_beep(1000, 5);
|
||||
vp_beep(1000, 3);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -532,6 +532,7 @@ bool vp_sequenceNotEmpty()
|
|||
return (vpCurrentSequence.length > 0);
|
||||
}
|
||||
|
||||
// Duration seems to be in tenths of a second.
|
||||
void vp_beep(uint16_t freq, uint16_t duration)
|
||||
{
|
||||
if (state.settings.vpLevel < vpBeep)
|
||||
|
|
@ -541,8 +542,8 @@ void vp_beep(uint16_t freq, uint16_t duration)
|
|||
if (currentBeepDuration)
|
||||
return ;
|
||||
// avoid extra long beeps!
|
||||
if (duration > 2000)
|
||||
duration=2000;
|
||||
if (duration > 20)
|
||||
duration=20;
|
||||
|
||||
currentBeepDuration=duration;
|
||||
audio_enableAmp();
|
||||
|
|
|
|||
|
|
@ -1966,6 +1966,9 @@ void ui_updateFSM(bool *sync_rtx)
|
|||
// All other cases are handled as needed.
|
||||
vp_announceScreen(state.ui_screen);
|
||||
}
|
||||
// generic beep for any key
|
||||
if ((msg.keys &0xffff) && (state.settings.vpLevel >= vpBeep))
|
||||
vp_beep(750, 3);
|
||||
}
|
||||
else if(event.type == EVENT_STATUS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ void platform_ledOff(led_t led)
|
|||
|
||||
void platform_beepStart(uint16_t freq)
|
||||
{
|
||||
toneGen_beepOn((float)freq, 128, 0);
|
||||
toneGen_beepOn((float)freq, 64, 0);
|
||||
}
|
||||
|
||||
void platform_beepStop()
|
||||
|
|
|
|||
Loading…
Reference in New Issue