diff --git a/openrtx/include/core/voicePromptUtils.h b/openrtx/include/core/voicePromptUtils.h index 9aea4704..f016f911 100644 --- a/openrtx/include/core/voicePromptUtils.h +++ b/openrtx/include/core/voicePromptUtils.h @@ -71,7 +71,9 @@ void announceGPSInfo(); void announceAboutScreen(); void announceBackupScreen(); void announceRestoreScreen(); - +#ifdef RTC_PRESENT +void announceSettingsTimeDate(); +#endif // RTC_PRESENT VoicePromptQueueFlags_T GetQueueFlagsForVoiceLevel(); #endif //VOICE_PROMPT_UTILS_H_INCLUDED \ No newline at end of file diff --git a/openrtx/src/core/voicePromptUtils.c b/openrtx/src/core/voicePromptUtils.c index d36c7ab7..e8babe51 100644 --- a/openrtx/src/core/voicePromptUtils.c +++ b/openrtx/src/core/voicePromptUtils.c @@ -588,6 +588,28 @@ void announceRestoreScreen() vpPlay(); } +#ifdef RTC_PRESENT +void announceSettingsTimeDate() +{ + vpInit(); + + vpQueueStringTableEntry(¤tLanguage->timeAndDate); + + datetime_t local_time = utcToLocalTime(state.time, state.settings.utc_timezone); + + char buffer[16] = "\0"; + snprintf(buffer, 16, "%02d/%02d/%02d", + local_time.date, local_time.month, local_time.year); + vpQueueString(buffer, (vpAnnounceCommonSymbols | vpAnnounceLessCommonSymbols)); + + snprintf(buffer, 16, "%02d:%02d:%02d", + local_time.hour, local_time.minute, local_time.second); + vpQueueString(buffer, (vpAnnounceCommonSymbols | vpAnnounceLessCommonSymbols)); + + vpPlay(); +} +#endif // RTC_PRESENT + /* there are 5 levels of verbosity: diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index 8c6f198b..bac3595f 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -1540,7 +1540,15 @@ void ui_updateFSM(bool *sync_rtx) #ifdef RTC_PRESENT // Time&Date settings screen case SETTINGS_TIMEDATE: - if(msg.keys & KEY_ENTER) + if ((msg.keys & KEY_F1) && (state.settings.vpLevel > vpBeep)) + {// quick press repeat vp, long press summary. + if (msg.long_press) + announceSettingsTimeDate(); + else + ReplayLastPrompt(); + f1Handled = true; + } + else if(msg.keys & KEY_ENTER) { // Switch to set Time&Date mode state.ui_screen = SETTINGS_TIMEDATE_SET;