Added function to announce generic on/off toggle settings.
This commit is contained in:
parent
33867ec009
commit
99408a5455
|
|
@ -193,6 +193,12 @@ void vp_announceSettingsTimeDate();
|
||||||
*/
|
*/
|
||||||
void vp_announceSettingsVoiceLevel(const vpQueueFlags_t flags);
|
void vp_announceSettingsVoiceLevel(const vpQueueFlags_t flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is called to speak generic settings on/off toggles.
|
||||||
|
*/
|
||||||
|
void vp_announceSettingsOnOffToggle(const char* const* stringTableStringPtr,
|
||||||
|
const vpQueueFlags_t flags, bool val);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -718,6 +718,19 @@ void vp_announceSettingsVoiceLevel(const vpQueueFlags_t flags)
|
||||||
playIfNeeded(flags);
|
playIfNeeded(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vp_announceSettingsOnOffToggle(const char* const* stringTableStringPtr,
|
||||||
|
const vpQueueFlags_t flags, bool val)
|
||||||
|
{
|
||||||
|
clearCurrPromptIfNeeded(flags);
|
||||||
|
|
||||||
|
if (flags & vpqIncludeDescriptions)
|
||||||
|
vp_queueStringTableEntry(stringTableStringPtr);
|
||||||
|
|
||||||
|
vp_queueStringTableEntry(val ? ¤tLanguage->on : ¤tLanguage->off);
|
||||||
|
|
||||||
|
playIfNeeded(flags);
|
||||||
|
}
|
||||||
|
|
||||||
vpQueueFlags_t vp_getVoiceLevelQueueFlags()
|
vpQueueFlags_t vp_getVoiceLevelQueueFlags()
|
||||||
{
|
{
|
||||||
uint8_t vpLevel = state.settings.vpLevel;
|
uint8_t vpLevel = state.settings.vpLevel;
|
||||||
|
|
|
||||||
|
|
@ -759,6 +759,10 @@ static void _ui_changeVoiceLevel(int variation)
|
||||||
static void _ui_changePhoneticSpell(bool newVal)
|
static void _ui_changePhoneticSpell(bool newVal)
|
||||||
{
|
{
|
||||||
state.settings.vpPhoneticSpell = newVal ? 1 : 0;
|
state.settings.vpPhoneticSpell = newVal ? 1 : 0;
|
||||||
|
|
||||||
|
vp_announceSettingsOnOffToggle(¤tLanguage->phonetic,
|
||||||
|
vp_getVoiceLevelQueueFlags(),
|
||||||
|
state.settings.vpPhoneticSpell);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _ui_checkStandby(long long time_since_last_event)
|
static bool _ui_checkStandby(long long time_since_last_event)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue