Fixed issue of m17 destination not being spoken in summary (long hold f1) if set to broadcast.

This commit is contained in:
vk7js 2022-09-22 21:35:15 +10:00 committed by Silvano Seva
parent 7cc287643e
commit c7c9c3afc5
2 changed files with 8 additions and 5 deletions

View File

@ -128,7 +128,7 @@ void vp_announceContact(const contact_t* contact, const vpQueueFlags_t flags);
/** /**
* *
*/ */
void vp_announceContactWithIndex(const uint16_t index, const vpQueueFlags_t flags); bool vp_announceContactWithIndex(const uint16_t index, const vpQueueFlags_t flags);
/** /**
* *

View File

@ -434,16 +434,18 @@ void vp_announceContact(const contact_t* contact, const vpQueueFlags_t flags)
playIfNeeded(flags); playIfNeeded(flags);
} }
void vp_announceContactWithIndex(const uint16_t index, const vpQueueFlags_t flags) bool vp_announceContactWithIndex(const uint16_t index, const vpQueueFlags_t flags)
{ {
if (index == 0) if (index == 0)
return; return false;
contact_t contact; contact_t contact;
if (cps_readContact(&contact, index) == -1) if (cps_readContact(&contact, index) == -1)
return; return false;
vp_announceContact(&contact, flags); vp_announceContact(&contact, flags);
return true;
} }
void vp_announceTimeslot(const uint8_t timeslot, const vpQueueFlags_t flags) void vp_announceTimeslot(const uint8_t timeslot, const vpQueueFlags_t flags)
@ -521,7 +523,8 @@ void vp_announceM17Info(const channel_t* channel, bool isEditing, const vpQueueF
} }
else if ((channel != NULL) && (channel->m17.contact_index != 0)) else if ((channel != NULL) && (channel->m17.contact_index != 0))
{ {
vp_announceContactWithIndex(channel->m17.contact_index, flags); if (!vp_announceContactWithIndex(channel->m17.contact_index, flags))
vp_queueStringTableEntry(&currentLanguage->broadcast);
} }
else else
{ {