forked from len0rd/rockbox
Patch FS#7641 by Daniel Dalton, talking clock improvements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14437 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fbd6c7b863
commit
518b8cc408
2 changed files with 32 additions and 5 deletions
|
@ -11105,3 +11105,20 @@
|
||||||
rtc: "A M"
|
rtc: "A M"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: VOICE_OH
|
||||||
|
desc: spoken only, for wall clock announce
|
||||||
|
user:
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
rtc: ""
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
rtc: ""
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
rtc: "oh"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
|
|
@ -227,30 +227,40 @@ static bool show_info(void)
|
||||||
/* Voice the minutes */
|
/* Voice the minutes */
|
||||||
if (tm->tm_min == 0)
|
if (tm->tm_min == 0)
|
||||||
{
|
{
|
||||||
/*say o'clock if the minute is 0. */
|
/* Say o'clock if the minute is 0. */
|
||||||
talk_id(VOICE_OCLOCK, true);
|
talk_id(VOICE_OCLOCK, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Pronounce the leading 0 */
|
||||||
|
if(tm->tm_min < 10)
|
||||||
|
{
|
||||||
|
talk_id(VOICE_OH, true);
|
||||||
|
}
|
||||||
talk_number(tm->tm_min, true);
|
talk_number(tm->tm_min, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
talk_id(am_pm_id, true);
|
talk_id(am_pm_id, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*voice the time in 24 hour format*/
|
/* Voice the time in 24 hour format */
|
||||||
talk_number(tm->tm_hour, true);
|
talk_number(tm->tm_hour, true);
|
||||||
if (tm->tm_min == 0)
|
if (tm->tm_min == 0)
|
||||||
{
|
{
|
||||||
/*say o'clock if the minute is 0. */
|
talk_id(VOICE_HUNDRED, true);
|
||||||
talk_id(VOICE_OCLOCK, true);
|
talk_id(VOICE_HOUR, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Pronounce the leading 0 */
|
||||||
|
if(tm->tm_min < 10)
|
||||||
|
{
|
||||||
|
talk_id(VOICE_OH, true);
|
||||||
|
}
|
||||||
talk_number(tm->tm_min, true);
|
talk_number(tm->tm_min, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true);
|
talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true);
|
||||||
talk_number(tm->tm_mday, true);
|
talk_number(tm->tm_mday, true);
|
||||||
talk_number(1900 + tm->tm_year, true);
|
talk_number(1900 + tm->tm_year, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue