2 * Authors (alphabetical order)
3 * - Bertrand Songis <bsongis@gmail.com>
4 * - Martin Hotar <mhotar@gmail.com>
6 * opentx is based on code named
7 * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
8 * er9x by Erez Raviv: http://code.google.com/p/er9x/,
9 * and the original (and ongoing) project by
10 * Thomas Husterer, th9x: http://code.google.com/p/th9x/
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
26 PL_PROMPT_NUMBERS_BASE
= 0,
27 PL_PROMPT_ZERO
= PL_PROMPT_NUMBERS_BASE
+0, //0-99
28 PL_PROMPT_STO
= PL_PROMPT_NUMBERS_BASE
+100, //100,200 .. 900
29 PL_PROMPT_TYSIAC
= PL_PROMPT_NUMBERS_BASE
+109, //1000
30 PL_PROMPT_TYSIACE
= PL_PROMPT_NUMBERS_BASE
+110,
31 PL_PROMPT_TYSIECY
= PL_PROMPT_NUMBERS_BASE
+111,
32 PL_PROMPT_JEDNA
= PL_PROMPT_NUMBERS_BASE
+112,
33 PL_PROMPT_JEDNO
= PL_PROMPT_NUMBERS_BASE
+113,
34 PL_PROMPT_DWIE
= PL_PROMPT_NUMBERS_BASE
+114,
35 PL_PROMPT_CALA
= PL_PROMPT_NUMBERS_BASE
+115,
36 PL_PROMPT_CALE
= PL_PROMPT_NUMBERS_BASE
+116,
37 PL_PROMPT_CALYCH
= PL_PROMPT_NUMBERS_BASE
+117,
38 PL_PROMPT_MINUS
= PL_PROMPT_NUMBERS_BASE
+118,
39 PL_PROMPT_DZIESIATKI_ZENSKIE
=PL_PROMPT_NUMBERS_BASE
+120, // 22(0122.wav),32(123.wav),42,52,62,72,82,92(129.wav) - this are special female numbers when the unit is female
41 PL_PROMPT_UNITS_BASE
= 160,
42 PL_PROMPT_VOLTS
= PL_PROMPT_UNITS_BASE
+UNIT_VOLTS
, //(jeden)wolt,(dwa)wolty,(piec+)woltów i tak dla wszytkich unitów
43 PL_PROMPT_AMPS
= PL_PROMPT_UNITS_BASE
+(UNIT_AMPS
*4),
44 PL_PROMPT_METERS_PER_SECOND
= PL_PROMPT_UNITS_BASE
+(UNIT_METERS_PER_SECOND
*4),
45 PL_PROMPT_SPARE1
= PL_PROMPT_UNITS_BASE
+(UNIT_RAW
*4),
46 PL_PROMPT_KMH
= PL_PROMPT_UNITS_BASE
+(UNIT_SPEED
*4),
47 PL_PROMPT_METERS
= PL_PROMPT_UNITS_BASE
+(UNIT_DIST
*4),
48 PL_PROMPT_DEGREES
= PL_PROMPT_UNITS_BASE
+(UNIT_TEMPERATURE
*4),
49 PL_PROMPT_PERCENT
= PL_PROMPT_UNITS_BASE
+(UNIT_PERCENT
*4),
50 PL_PROMPT_MILLIAMPS
= PL_PROMPT_UNITS_BASE
+(UNIT_MILLIAMPS
*4),
51 PL_PROMPT_MAH
= PL_PROMPT_UNITS_BASE
+(UNIT_MAH
*4),
52 PL_PROMPT_WATTS
= PL_PROMPT_UNITS_BASE
+(UNIT_WATTS
*4),
53 PL_PROMPT_DB
= PL_PROMPT_UNITS_BASE
+(UNIT_DB
*4),
54 PL_PROMPT_FEET
= PL_PROMPT_UNITS_BASE
+(UNIT_FEET
*4),
55 PL_PROMPT_KTS
= PL_PROMPT_UNITS_BASE
+(UNIT_KTS
*4),
56 PL_PROMPT_HOURS
= PL_PROMPT_UNITS_BASE
+(UNIT_HOURS
*4),
57 PL_PROMPT_MINUTES
= PL_PROMPT_UNITS_BASE
+(UNIT_MINUTES
*4),
58 PL_PROMPT_SECONDS
= PL_PROMPT_UNITS_BASE
+(UNIT_SECONDS
*4),
59 PL_PROMPT_RPMS
= PL_PROMPT_UNITS_BASE
+(UNIT_RPMS
*4),
60 PL_PROMPT_G
= PL_PROMPT_UNITS_BASE
+(UNIT_G
*4),
61 PL_PROMPT_MILLILITERS
= PL_PROMPT_UNITS_BASE
+(UNIT_MILLILITERS
*4),
62 PL_PROMPT_FLOZ
= PL_PROMPT_UNITS_BASE
+(UNIT_FLOZ
*4),
63 PL_PROMPT_FEET_PER_SECOND
= PL_PROMPT_UNITS_BASE
+(UNIT_FEET_PER_SECOND
*4),
67 #define PL_PUSH_UNIT_PROMPT(u, p) pl_pushUnitPrompt((u), (p), id)
73 I18N_PLAY_FUNCTION(pl
, pushUnitPrompt
, uint8_t unitprompt
, int16_t number
)
76 PUSH_UNIT_PROMPT(unitprompt
, 0);
77 else if (number
> 1 && number
< 5)
78 PUSH_UNIT_PROMPT(unitprompt
, 1);
83 ten
=(number
- (number
% 10))/10;
84 if ((test_2
> 1 && test_2
< 5) && ten
>=2)
85 PUSH_UNIT_PROMPT(unitprompt
, 1);
87 PUSH_UNIT_PROMPT(unitprompt
, 2);
91 I18N_PLAY_FUNCTION(pl
, playNumber
, getvalue_t number
, uint8_t unit
, uint8_t att
)
95 PUSH_NUMBER_PROMPT(PL_PROMPT_MINUS
);
100 int8_t mode
= MODE(att
);
105 div_t qr
= div((int)number
, 10);
107 PLAY_NUMBER(qr
.quot
, 0, ZENSKI
);
109 PUSH_NUMBER_PROMPT(PL_PROMPT_CALA
);
111 PL_PUSH_UNIT_PROMPT(PL_PROMPT_CALA
, qr
.quot
);
112 PLAY_NUMBER(qr
.rem
, 0, ZENSKI
);
113 PUSH_NUMBER_PROMPT(PL_PROMPT_UNITS_BASE
+((unit
-1)*4)+3);
121 int16_t tmp
= number
;
152 if ((number
== 1) && (att
== ZENSKI
)) {
153 PUSH_NUMBER_PROMPT(PL_PROMPT_JEDNA
);
157 if ((number
== 1) && (att
== NIJAKI
)) {
158 PUSH_NUMBER_PROMPT(PL_PROMPT_JEDNO
);
162 if ((number
== 2) && (att
== ZENSKI
)) {
163 PUSH_NUMBER_PROMPT(PL_PROMPT_DWIE
);
167 if (number
>= 1000) {
169 PLAY_NUMBER(number
/ 1000, 0, 0);
171 if (number
>= 2000 && number
< 5000)
172 PUSH_NUMBER_PROMPT(PL_PROMPT_TYSIACE
);
173 else if (number
>= 5000)
174 PUSH_NUMBER_PROMPT(PL_PROMPT_TYSIECY
);
176 PUSH_NUMBER_PROMPT(PL_PROMPT_TYSIAC
);
183 PUSH_NUMBER_PROMPT(PL_PROMPT_STO
+ (number
/100)-1);
193 ten
=(number
- (number
% 10))/10;
194 if (att
== ZENSKI
&& test_2
==2 && ten
>= 2 ) {
196 PUSH_NUMBER_PROMPT(PL_PROMPT_DZIESIATKI_ZENSKIE
+ten
);
198 PUSH_NUMBER_PROMPT(PL_PROMPT_ZERO
+number
);
202 PL_PUSH_UNIT_PROMPT(unit
, tmp
);
207 // The whole funtion has to be changed
208 I18N_PLAY_FUNCTION(pl
, playDuration
, int seconds PLAY_DURATION_ATT
)
211 PUSH_NUMBER_PROMPT(PL_PROMPT_MINUS
);
215 uint8_t tmp
= seconds
/ 3600;
217 if (tmp
> 0 || IS_PLAY_TIME()) {
218 PLAY_NUMBER(tmp
, UNIT_HOURS
, ZENSKI
);
224 PLAY_NUMBER(tmp
, UNIT_MINUTES
, ZENSKI
);
228 PLAY_NUMBER(seconds
, UNIT_SECONDS
, ZENSKI
);
232 LANGUAGE_PACK_DECLARE(pl
, "Polish");