From bcec714aa09950cf75a825ab9a357f68efff7d75 Mon Sep 17 00:00:00 2001 From: "mhotar@gmail.com" Date: Thu, 2 Aug 2012 19:26:41 +0000 Subject: [PATCH] tts_cz base numbers extended to 0-99,100,200 .. 900 --- src/translations/tts_cz.cpp | 67 ++++++++++++++----------------------- 1 file changed, 26 insertions(+), 41 deletions(-) diff --git a/src/translations/tts_cz.cpp b/src/translations/tts_cz.cpp index 009af0c22..b720954ed 100644 --- a/src/translations/tts_cz.cpp +++ b/src/translations/tts_cz.cpp @@ -36,36 +36,29 @@ enum CzechPrompts { PROMPT_NUMBERS_BASE = 0, - PROMPT_NULA = PROMPT_NUMBERS_BASE+0, - /* ... */ - PROMPT_DVACET = PROMPT_NUMBERS_BASE+20, - PROMPT_TRICET = PROMPT_NUMBERS_BASE+21, - /* ... */ - PROMPT_DEVADESAT = PROMPT_NUMBERS_BASE+27, - PROMPT_JEDEN = PROMPT_NUMBERS_BASE+28, - PROMPT_JEDNO = PROMPT_NUMBERS_BASE+29, - PROMPT_DVE = PROMPT_NUMBERS_BASE+30, - PROMPT_STO = PROMPT_NUMBERS_BASE+31, - PROMPT_STA = PROMPT_NUMBERS_BASE+32, - PROMPT_SET = PROMPT_NUMBERS_BASE+33, - PROMPT_TISIC = PROMPT_NUMBERS_BASE+34, - PROMPT_TISICE = PROMPT_NUMBERS_BASE+35, - PROMPT_CELA = PROMPT_NUMBERS_BASE+36, - PROMPT_CELE = PROMPT_NUMBERS_BASE+37, - PROMPT_CELYCH = PROMPT_NUMBERS_BASE+38, - PROMPT_MINUS = 39, + PROMPT_NULA = PROMPT_NUMBERS_BASE+0, //0-99 + PROMPT_STO = PROMPT_NUMBERS_BASE+100, //100,200 .. 900 + PROMPT_TISIC = PROMPT_NUMBERS_BASE+109, //1000 + PROMPT_TISICE = PROMPT_NUMBERS_BASE+110, + PROMPT_JEDEN = PROMPT_NUMBERS_BASE+111, + PROMPT_JEDNO = PROMPT_NUMBERS_BASE+112, + PROMPT_DVE = PROMPT_NUMBERS_BASE+113, + PROMPT_CELA = PROMPT_NUMBERS_BASE+114, + PROMPT_CELE = PROMPT_NUMBERS_BASE+115, + PROMPT_CELYCH = PROMPT_NUMBERS_BASE+116, + PROMPT_MINUS = PROMPT_NUMBERS_BASE+117, - PROMPT_HODINA = 41, - PROMPT_HODINY = 42, - PROMPT_HODIN = 43, - PROMPT_MINUTA = 44, - PROMPT_MINUTY = 45, - PROMPT_MINUT = 46, - PROMPT_SEKUNDA = 47, - PROMPT_SEKUNDY = 48, - PROMPT_SEKUND = 49, + PROMPT_HODINA = 118, + PROMPT_HODINY = 119, + PROMPT_HODIN = 120, + PROMPT_MINUTA = 121, + PROMPT_MINUTY = 122, + PROMPT_MINUT = 123, + PROMPT_SEKUNDA = 124, + PROMPT_SEKUNDY = 125, + PROMPT_SEKUND = 126, - PROMPT_UNITS_BASE = 50, + PROMPT_UNITS_BASE = 130, PROMPT_VOLTS = PROMPT_UNITS_BASE+UNIT_VOLTS, //(jeden)volt,(dva)volty,(pet)voltu,(desetina)voltu PROMPT_AMPS = PROMPT_UNITS_BASE+(UNIT_AMPS*4), PROMPT_METERS_PER_SECOND = PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*4), @@ -80,7 +73,7 @@ enum CzechPrompts { PROMPT_FEET = PROMPT_UNITS_BASE+(UNIT_FEET*4), PROMPT_KTS = PROMPT_UNITS_BASE+(UNIT_KTS*4), - PROMPT_LABELS_BASE = 110, + PROMPT_LABELS_BASE = 190, PROMPT_TIMER1 = PROMPT_LABELS_BASE+TELEM_TM1, PROMPT_TIMER2 = PROMPT_LABELS_BASE+TELEM_TM2, PROMPT_A1 = PROMPT_LABELS_BASE+TELEM_A1, @@ -106,8 +99,7 @@ enum CzechPrompts { PROMPT_ACCELz = PROMPT_LABELS_BASE+TELEM_ACCz, PROMPT_HDG = PROMPT_LABELS_BASE+TELEM_HDG, PROMPT_VARIO = PROMPT_LABELS_BASE+TELEM_VSPD, - - + }; #if defined(VOICE) @@ -158,7 +150,7 @@ void playNumber(int16_t number, uint8_t unit, uint8_t att) case 8: att = STREDNI; case 10: - att = ZENSKY; + case 11: case 12: att = ZENSKY; default: @@ -197,19 +189,12 @@ void playNumber(int16_t number, uint8_t unit, uint8_t att) number = -1; } if (number >= 100) { - if (number/100 != 1) - playNumber(number/100,0,STREDNI); - pushUnitPrompt(number/100,PROMPT_STO); + pushPrompt(PROMPT_STO + (number/100)-1); number %= 100; if (number == 0) number = -1; } - if (number >= 20) { - pushPrompt(PROMPT_DVACET + (number-20)/10); - number %= 10; - if (number == 0) - number = -1; - } + if (number >= 0) { pushPrompt(PROMPT_NULA+number); }