Index: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 14279) +++ apps/lang/english.lang (working copy) @@ -11001,3 +11001,54 @@ *: "" + + id: VOICE_OCLOCK + desc: spoken only, for wall clock announce + user: + + *: none + rtc: "" + + + *: none + rtc: "" + + + *: none + rtc: "o'clock" + + + + id: VOICE_PM + desc: spoken only, for wall clock announce + user: + + *: none + rtc: "" + + + *: none + rtc: "" + + + *: none + rtc: "Pm" + + + + id: VOICE_AM + desc: spoken only, for wall clock announce + user: + + *: none + rtc: "" + + + *: none + rtc: "" + + + *: none + rtc: "A M" + + \ No newline at end of file Index: apps/menus/main_menu.c =================================================================== --- apps/menus/main_menu.c (revision 14279) +++ apps/menus/main_menu.c (working copy) @@ -209,9 +209,45 @@ { struct tm* tm = get_time(); talk_id(VOICE_CURRENT_TIME, true); + if ( global_settings.timeformat ==1) + { +/*voice the time in 12 hour format*/ + if (tm->tm_hour >= 12) /*Voice the hour in 12 hour format if the setting is set to*/ + { + talk_value(tm->tm_hour, UNIT_INT, true); + } + else if (tm->tm_hour ==0) + { + talk_value(tm->tm_hour+12, UNIT_INT, true); /*Make it say 12 am instead of 0 am*/ + } + else + { + talk_value(tm->tm_hour-12, UNIT_INT, true); + } + if (tm->tm_min ==0) + { + /*Voice the minute*/ + talk_id(VOICE_OCLOCK, true); /*say o'clock if the minute is on 0. Example: "8 0" but it will say "8 o'clock" here*/ + } + else + { + talk_value(tm->tm_min, UNIT_INT, true); /*minute isn't 0 just voice its value*/ + } + if (tm->tm_hour >=12) + { + talk_id(VOICE_PM, true); + } + else + { + talk_id(VOICE_AM, true); + } + } + if ( global_settings.timeformat ==0) + { +/*voice the time in 24 hour format*/ talk_value(tm->tm_hour, UNIT_HOUR, true); talk_value(tm->tm_min, UNIT_MIN, true); - talk_value(tm->tm_sec, UNIT_SEC, true); + } talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true); talk_number(tm->tm_mday, true); talk_number(1900 + tm->tm_year, true);