From 0138d843b10e4db681f2910038dc1be20979c1ea Mon Sep 17 00:00:00 2001 From: vk7js <58905135+vk7js@users.noreply.github.com> Date: Tue, 6 Sep 2022 09:23:54 +1000 Subject: [PATCH] Improved time/date entry: 1. Now give format as dd/mm/yy before date and hh:mm before time. 2. Say the slash immediately after the 2nd and 4th digits are entered in the date and the colon immediately after the 2nd digit of the time. 3. Removed speaking of the 2nd colon in the time since seconds input is disallowed. --- openrtx/src/ui/ui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index 28f24afa..364b4de6 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -483,14 +483,14 @@ static void _ui_timedate_add_digit(datetime_t *timedate, uint8_t pos, uint8_t number) { vp_flush(); - if (pos==3 || pos==5) + vp_queueInteger(number); + if (pos == 2 || pos == 4) vp_queuePrompt(PROMPT_SLASH); // just indicates separation of date and time. - if (pos==7) // start of time. - vp_queuePrompt(PROMPT_SPACE); - if (pos==9 || pos==11) + if (pos==6) // start of time. + vp_queueString("hh:mm", vpAnnounceCommonSymbols|vpAnnounceLessCommonSymbols); + if (pos == 8) vp_queuePrompt(PROMPT_COLON); - vp_queueInteger(number); vp_play(); switch(pos) @@ -1705,7 +1705,7 @@ void ui_updateFSM(bool *sync_rtx) ui_state.input_position = 0; memset(&ui_state.new_timedate, 0, sizeof(datetime_t)); vp_announceBuffer(¤tLanguage->timeAndDate, - true, false, ""); + true, false, "dd/mm/yy"); } else if(msg.keys & KEY_ESC) _ui_menuBack(MENU_SETTINGS);