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,53 @@ { struct tm* tm = get_time(); talk_id(VOICE_CURRENT_TIME, true); + if ( global_settings.timeformat ==1) + { + if (tm->tm_hour == 12) + { + talk_value(tm->tm_hour, UNIT_INT, true); + } + else if (tm->tm_hour > 12) + { + talk_value(tm->tm_hour-12, UNIT_INT, true); + } + else if (tm->tm_hour ==0) + { + talk_value(tm->tm_hour+12, UNIT_INT, true); + } + else + { + talk_value(tm->tm_hour, UNIT_INT, true); + } +switch(tm->tm_minute) +/*Switch statement to check if minute is 0 or not. then say o'clock if it is 0 otherwise speak the minute value*/ +{ +case 0: +talk_id(LANG_OCLOCK, true); +break; +default: +talk_id(tm->tm_hour, true); +break; +} + + if (tm->tm_hour >12) + { + talk_id(VOICE_PM, true); + } + else if(tm->tm_hour ==12) + { + talk_id(VOICE_PM, true); + } + else + { + talk_id(VOICE_AM, true); + } + } + if ( global_settings.timeformat ==0) + { 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);