Extracted announceM17Info logic to its own function.
This commit is contained in:
parent
339131a5b7
commit
c3667313ba
|
|
@ -65,6 +65,8 @@ void announceContactWithIndex(uint16_t index, VoicePromptQueueFlags_T flags);
|
||||||
void announceTimeslot(uint8_t timeslot, VoicePromptQueueFlags_T flags);
|
void announceTimeslot(uint8_t timeslot, VoicePromptQueueFlags_T flags);
|
||||||
void announceColorCode(uint8_t rxColorCode, uint8_t txColorCode, VoicePromptQueueFlags_T flags);
|
void announceColorCode(uint8_t rxColorCode, uint8_t txColorCode, VoicePromptQueueFlags_T flags);
|
||||||
void announceBank(uint16_t bank, VoicePromptQueueFlags_T flags);
|
void announceBank(uint16_t bank, VoicePromptQueueFlags_T flags);
|
||||||
|
void announceM17Info(channel_t* channel, VoicePromptQueueFlags_T flags);
|
||||||
|
|
||||||
VoicePromptQueueFlags_T GetQueueFlagsForVoiceLevel();
|
VoicePromptQueueFlags_T GetQueueFlagsForVoiceLevel();
|
||||||
|
|
||||||
#endif //VOICE_PROMPT_UTILS_H_INCLUDED
|
#endif //VOICE_PROMPT_UTILS_H_INCLUDED
|
||||||
|
|
@ -203,14 +203,7 @@ VoicePromptQueueFlags_T flags)
|
||||||
}
|
}
|
||||||
else if (channel->mode == OPMODE_M17)
|
else if (channel->mode == OPMODE_M17)
|
||||||
{
|
{
|
||||||
if (state.m17_data.dst_addr[0])
|
announceM17Info(channel, localFlags);
|
||||||
{
|
|
||||||
if (localFlags & vpqIncludeDescriptions)
|
|
||||||
vpQueuePrompt(PROMPT_DEST_ID);
|
|
||||||
vpQueueString(state.m17_data.dst_addr, vpAnnounceCommonSymbols);
|
|
||||||
}
|
|
||||||
else if (channel->m17.contact_index)
|
|
||||||
announceContactWithIndex(channel->m17.contact_index, localFlags);
|
|
||||||
}
|
}
|
||||||
else if (channel->mode == OPMODE_DMR)
|
else if (channel->mode == OPMODE_DMR)
|
||||||
{
|
{
|
||||||
|
|
@ -433,7 +426,24 @@ void announceBank(uint16_t bank, VoicePromptQueueFlags_T flags)
|
||||||
vpQueueString(bank_hdr.name, vpAnnounceCommonSymbols);
|
vpQueueString(bank_hdr.name, vpAnnounceCommonSymbols);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vpQueueStringTableEntry(currentLanguage->allChannels);
|
vpQueueStringTableEntry(¤tLanguage->allChannels);
|
||||||
|
|
||||||
|
vpPlayIfNeeded(flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
void announceM17Info(channel_t* channel, VoicePromptQueueFlags_T flags)
|
||||||
|
{
|
||||||
|
if (!channel) return;
|
||||||
|
|
||||||
|
vpInitIfNeeded(flags);
|
||||||
|
if (state.m17_data.dst_addr[0])
|
||||||
|
{
|
||||||
|
if (flags & vpqIncludeDescriptions)
|
||||||
|
vpQueuePrompt(PROMPT_DEST_ID);
|
||||||
|
vpQueueString(state.m17_data.dst_addr, vpAnnounceCommonSymbols);
|
||||||
|
}
|
||||||
|
else if (channel->m17.contact_index)
|
||||||
|
announceContactWithIndex(channel->m17.contact_index, flags);
|
||||||
|
|
||||||
vpPlayIfNeeded(flags);
|
vpPlayIfNeeded(flags);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue