[stock tts_en] decimal point numbers reduced to only one

[stock tts_en] added ".1" to ".9" wavs do reduce delays
This commit is contained in:
mhotar@gmail.com
2012-10-27 23:48:00 +00:00
parent 3516845bef
commit 90dd3e45cd
2 changed files with 27 additions and 2 deletions
+23 -2
View File
@@ -62,6 +62,8 @@ enum EnglishPrompts {
PROMPT_SECONDS = PROMPT_UNITS_BASE+(UNIT_SECONDS*2),
PROMPT_RPMS = PROMPT_UNITS_BASE+(UNIT_RPMS*2),
PROMPT_G = PROMPT_UNITS_BASE+(UNIT_G*2),
PROMPT_POINT_NUMBER = PROMPT_NUMBERS_BASE+160, //.1 - .9
};
@@ -97,7 +99,26 @@ PLAY_FUNCTION(playNumber, int16_t number, uint8_t unit, uint8_t att)
PUSH_PROMPT(PROMPT_MINUS);
number = -number;
}
#if defined (PCBSTD)
int8_t mode = MODE(att);
if (mode > 0) {
div_t qr = div(number, (mode == 1 ? 10 : 100));
if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, 0);
if (mode == 2 ) {
if (qr.rem >= 10)
PUSH_PROMPT(PROMPT_POINT_NUMBER + (qr.rem/10) -1);
}
else
PUSH_PROMPT(PROMPT_POINT_NUMBER + qr.rem -1);
PUSH_PROMPT(PROMPT_UNITS_BASE+((unit-1)*2)+1);
}
else
PLAY_NUMBER(qr.quot, unit, 0);
return;
}
#elif
int8_t mode = MODE(att);
if (mode > 0) {
div_t qr = div(number, (mode == 1 ? 10 : 100));
@@ -122,7 +143,7 @@ PLAY_FUNCTION(playNumber, int16_t number, uint8_t unit, uint8_t att)
PLAY_NUMBER(qr.quot, unit, 0);
return;
}
#endif
int16_t tmp = number;
if (number >= 1000) {
+4
View File
@@ -162,6 +162,10 @@ if __name__ == "__main__":
"r p m", "r p m",
"g", "g"]):
systemSounds.extend(generate(s, 115+i))
for i, s in enumerate(["point one", "point two", "point three",
"point four", "point five", "point six",
"point seven", "point eight", "point nine"]):
systemSounds.extend(generate(s, 160+i))
for s, f, a in [(u"trim center", "midtrim", 244),
(u"maximum trim reached", "endtrim", 0),
(u"transmitter battery low", "lowbatt", 231),