diff --git a/openrtx/include/core/voicePrompts.h b/openrtx/include/core/voicePrompts.h index 64e09de3..ba5cb3c1 100644 --- a/openrtx/include/core/voicePrompts.h +++ b/openrtx/include/core/voicePrompts.h @@ -124,6 +124,14 @@ PROMPT_TIMESLOT, // timeslot PROMPT_COLORCODE, // color code PROMPT_TONE, // tone PROMPT_CONTACT, // contact +PROMPT_NORTH, // north +PROMPT_SOUTH, // south +PROMPT_EAST, // east +PROMPT_WEST, // west +PROMPT_LATITUDE, // latitude +PROMPT_LONGITUDE, // longitude +PROMPT_SPEED, // speed +PROMPT_ALTITUDE, // altitude PROMPT_CHARACTER, // character PROMPT_SPACE, // space PROMPT_PERCENT, // Percent diff --git a/openrtx/src/core/voicePromptUtils.c b/openrtx/src/core/voicePromptUtils.c index b9bfbaf0..192e4126 100644 --- a/openrtx/src/core/voicePromptUtils.c +++ b/openrtx/src/core/voicePromptUtils.c @@ -492,16 +492,22 @@ void announceGPSInfo(VoicePromptQueueFlags_T flags) } // lat/long char buffer[16] = "\0"; - snprintf(buffer, 16, "%8.6f N", state.gps_data.latitude); + vpQueuePrompt(PROMPT_LATITUDE); + snprintf(buffer, 16, "%8.6f", state.gps_data.latitude); vpQueueString(buffer, vpAnnounceCommonSymbols); + vpQueuePrompt(PROMPT_NORTH); float longitude = state.gps_data.longitude; - const char *direction = (longitude < 0) ? "W" : "E"; + voicePrompt_t direction = (longitude < 0) ? PROMPT_WEST : PROMPT_EAST; longitude = (longitude < 0) ? -longitude : longitude; - snprintf(buffer, 16, "%8.6f %s", longitude, direction); + snprintf(buffer, 16, "%8.6f", longitude); + vpQueuePrompt(PROMPT_LONGITUDE); vpQueueString(buffer, vpAnnounceCommonSymbols); + vpQueuePrompt(direction); // speed/altitude: + vpQueuePrompt(PROMPT_SPEED); snprintf(buffer, 16, "%4.1fkm/h", state.gps_data.speed); vpQueueString(buffer, vpAnnounceCommonSymbols); + vpQueuePrompt(PROMPT_ALTITUDE); snprintf(buffer, 16, "%4.1fm", state.gps_data.altitude); vpQueueString(buffer, vpAnnounceCommonSymbols);