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 SE_PROMPT_NUMBERS_BASE
= 0,
42 SE_PROMPT_ZERO
= SE_PROMPT_NUMBERS_BASE
+0, //02-99
43 SE_PROMPT_HUNDRED
= SE_PROMPT_NUMBERS_BASE
+100, //100,200 .. 900
44 SE_PROMPT_THOUSAND
= SE_PROMPT_NUMBERS_BASE
+109, //1000
45 SE_PROMPT_AND
= SE_PROMPT_NUMBERS_BASE
+110,
46 SE_PROMPT_MINUS
= SE_PROMPT_NUMBERS_BASE
+111,
47 SE_PROMPT_POINT
= SE_PROMPT_NUMBERS_BASE
+112,
48 SE_PROMPT_UNITS_BASE
= 113,
49 SE_PROMPT_POINT_BASE
= 165, //.0 - .9
53 #define SE_PUSH_UNIT_PROMPT(u, p) se_pushUnitPrompt((u), (p), id)
55 I18N_PLAY_FUNCTION(se
, pushUnitPrompt
, uint8_t unitprompt
, int16_t number
)
58 PUSH_UNIT_PROMPT(unitprompt
, 0);
60 PUSH_UNIT_PROMPT(unitprompt
, 1);
63 I18N_PLAY_FUNCTION(se
, playNumber
, getvalue_t number
, uint8_t unit
, uint8_t att
)
66 PUSH_NUMBER_PROMPT(SE_PROMPT_MINUS
);
71 int8_t mode
= MODE(att
);
76 div_t qr
= div((int)number
, 10);
78 PLAY_NUMBER(qr
.quot
, 0, 0);
79 PUSH_NUMBER_PROMPT(SE_PROMPT_POINT_BASE
+ qr
.rem
);
87 int16_t tmpNumber
= number
;
90 PLAY_NUMBER(number
/ 1000, 0, 0);
91 PUSH_NUMBER_PROMPT(SE_PROMPT_THOUSAND
);
97 PUSH_NUMBER_PROMPT(SE_PROMPT_HUNDRED
+ (number
/100)-1);
103 PUSH_NUMBER_PROMPT(SE_PROMPT_ZERO
+ number
);
107 SE_PUSH_UNIT_PROMPT(unit
, tmpNumber
);
111 I18N_PLAY_FUNCTION(se
, playDuration
, int seconds PLAY_DURATION_ATT
)
114 PUSH_NUMBER_PROMPT(SE_PROMPT_MINUS
);
118 uint8_t tmp
= seconds
/ 3600;
120 if (tmp
> 0 || IS_PLAY_TIME()) {
121 PLAY_NUMBER(tmp
, UNIT_HOURS
, 0);
127 PLAY_NUMBER(tmp
, UNIT_MINUTES
, 0);
129 PUSH_NUMBER_PROMPT(SE_PROMPT_AND
);
133 PLAY_NUMBER(seconds
, UNIT_SECONDS
, 0);
137 LANGUAGE_PACK_DECLARE(se
, "Swedish");