2 * Authors (alphabetical order)
3 * - Andre Bernet <bernet.andre@gmail.com>
5 * - Bertrand Songis <bsongis@gmail.com>
6 * - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
7 * - Cameron Weeks <th9xer@gmail.com>
10 * - Jean-Pierre Parisy
18 * - Romolo Manfredini <romolo.manfredini@gmail.com>
21 * opentx is based on code named
22 * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
23 * er9x by Erez Raviv: http://code.google.com/p/er9x/,
24 * and the original (and ongoing) project by
25 * Thomas Husterer, th9x: http://code.google.com/p/th9x/
27 * This program is free software; you can redistribute it and/or modify
28 * it under the terms of the GNU General Public License version 2 as
29 * published by the Free Software Foundation.
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
41 SK_PROMPT_NUMBERS_BASE
= 0,
42 SK_PROMPT_NULA
= SK_PROMPT_NUMBERS_BASE
+0, //0-99
43 SK_PROMPT_STO
= SK_PROMPT_NUMBERS_BASE
+100, //100,200 .. 900
44 SK_PROMPT_TISIC
= SK_PROMPT_NUMBERS_BASE
+109, //1000
45 SK_PROMPT_DVETISIC
= SK_PROMPT_NUMBERS_BASE
+110,
46 SK_PROMPT_JEDEN
= SK_PROMPT_NUMBERS_BASE
+111,
47 SK_PROMPT_JEDNO
= SK_PROMPT_NUMBERS_BASE
+112,
48 SK_PROMPT_DVE
= SK_PROMPT_NUMBERS_BASE
+113,
49 SK_PROMPT_CELA
= SK_PROMPT_NUMBERS_BASE
+114,
50 SK_PROMPT_CELE
= SK_PROMPT_NUMBERS_BASE
+115,
51 SK_PROMPT_CELYCH
= SK_PROMPT_NUMBERS_BASE
+116,
52 SK_PROMPT_MINUS
= SK_PROMPT_NUMBERS_BASE
+117,
54 SK_PROMPT_UNITS_BASE
= 118, //(jeden)volt,(dva)volty,(pet)voltu,(desetina)voltu
61 #define SK_PUSH_UNIT_PROMPT(u, p) sk_pushUnitPrompt((u), (p), id)
63 #define SK_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
70 I18N_PLAY_FUNCTION(sk
, pushUnitPrompt
, uint8_t unitprompt
, int16_t number
)
74 PUSH_UNIT_PROMPT(unitprompt
, 0);
75 else if (number
> 1 && number
< 5)
76 PUSH_UNIT_PROMPT(unitprompt
, 1);
78 PUSH_UNIT_PROMPT(unitprompt
, 2);
80 unitprompt
= SK_PROMPT_UNITS_BASE
+ unitprompt
*4;
82 PUSH_NUMBER_PROMPT(unitprompt
);
83 else if (number
> 1 && number
< 5)
84 PUSH_NUMBER_PROMPT(unitprompt
+1);
86 PUSH_NUMBER_PROMPT(unitprompt
+2);
90 I18N_PLAY_FUNCTION(sk
, playNumber
, getvalue_t number
, uint8_t unit
, uint8_t att
)
94 PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS
);
101 convertUnit(number
, unit
);
102 if (IS_IMPERIAL_ENABLE()) {
103 if (unit
== UNIT_DIST
) {
106 if (unit
== UNIT_SPEED
) {
114 int8_t mode
= MODE(att
);
121 // we assume that we are PREC1
123 div_t qr
= div((int)number
, 10);
125 PLAY_NUMBER(qr
.quot
, 0, ZENSKY
);
127 PUSH_NUMBER_PROMPT(SK_PROMPT_CELA
);
129 SK_PUSH_UNIT_PROMPT(SK_PROMPT_CELA
, qr
.quot
);
130 PLAY_NUMBER(qr
.rem
, 0, ZENSKY
);
131 PUSH_NUMBER_PROMPT(SK_PROMPT_UNITS_BASE
+((unit
-1)*4)+3);
139 int16_t tmp
= number
;
188 if ((number
== 1) && (att
== MUZSKY
)) {
189 PUSH_NUMBER_PROMPT(SK_PROMPT_JEDEN
);
193 if ((number
== 1) && (att
== STREDNI
)) {
194 PUSH_NUMBER_PROMPT(SK_PROMPT_JEDNO
);
198 if ((number
== 2) && ((att
== ZENSKY
) || (att
== STREDNI
))) {
199 PUSH_NUMBER_PROMPT(SK_PROMPT_DVE
);
203 if (number
>= 1000) {
205 PLAY_NUMBER(number
/ 1000, 0, 0);
206 if (number
>= 2000 && number
< 3000)
207 PUSH_NUMBER_PROMPT(SK_PROMPT_DVETISIC
);
209 PUSH_NUMBER_PROMPT(SK_PROMPT_TISIC
);
216 PUSH_NUMBER_PROMPT(SK_PROMPT_STO
+ (number
/100)-1);
223 PUSH_NUMBER_PROMPT(SK_PROMPT_NULA
+number
);
227 SK_PUSH_UNIT_PROMPT(unit
, tmp
);
231 I18N_PLAY_FUNCTION(sk
, playDuration
, int seconds PLAY_DURATION_ATT
)
234 PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS
);
238 uint8_t tmp
= seconds
/ 3600;
240 if (tmp
> 0 || IS_PLAY_TIME()) {
241 PLAY_NUMBER(tmp
, UNIT_HOURS
, ZENSKY
);
247 PLAY_NUMBER(tmp
, UNIT_MINUTES
, ZENSKY
);
251 PLAY_NUMBER(seconds
, UNIT_SECONDS
, ZENSKY
);
255 LANGUAGE_PACK_DECLARE(sk
, "Slovak");