Proposal to fix #4831 (CZ TTS problem with PREC1 and units) (#4856)

* Proposal to fix #4831

* Next fix for #4831

* Initiate some CZ docs

* Some more structure, still a workframe

* My attempt to help with #4831

* Update tts_doc_cz.md

* copy/paste error

* Update tts_doc_cz.md

* missed one number/qr.quot

* Cosmetics

* Consistency in parameters order

* Nearly complete doc

* Cosmetics to facilitate coding for non CZ devs

* Fix integer+unit, cosmetics

* Update tts_doc Radians and Mililiters are Male gender

* Radian and Millimeter are Male (so i've been told)

* Cosmetics

* Invers pushUnitPrompt parameters as per bsongis request
This commit is contained in:
Bertrand Songis
2017-04-26 21:42:01 +02:00
committed by GitHub
parent c15922a942
commit f10bad7abe
9 changed files with 206 additions and 139 deletions
+67 -84
View File
@@ -24,9 +24,9 @@
enum CzechPrompts {
CZ_PROMPT_NUMBERS_BASE = 0,
CZ_PROMPT_NULA = CZ_PROMPT_NUMBERS_BASE+0, //0-99
CZ_PROMPT_STO = CZ_PROMPT_NUMBERS_BASE+100, //100,200 .. 900
CZ_PROMPT_TISIC = CZ_PROMPT_NUMBERS_BASE+109, //1000
CZ_PROMPT_NULA = CZ_PROMPT_NUMBERS_BASE+0, // 0-99
CZ_PROMPT_STO = CZ_PROMPT_NUMBERS_BASE+100, // 100,200 .. 900
CZ_PROMPT_TISIC = CZ_PROMPT_NUMBERS_BASE+109, // 1000
CZ_PROMPT_TISICE = CZ_PROMPT_NUMBERS_BASE+110,
CZ_PROMPT_JEDEN = CZ_PROMPT_NUMBERS_BASE+111,
CZ_PROMPT_JEDNO = CZ_PROMPT_NUMBERS_BASE+112,
@@ -36,45 +36,44 @@ enum CzechPrompts {
CZ_PROMPT_CELYCH = CZ_PROMPT_NUMBERS_BASE+116,
CZ_PROMPT_MINUS = CZ_PROMPT_NUMBERS_BASE+117,
CZ_PROMPT_UNITS_BASE = 118, //(jeden)volt,(dva)volty,(pet)voltu,(desetina)voltu
CZ_PROMPT_UNITS_BASE = 118, // (jeden)volt,(dva)volty,(pet)voltu,(desetina)voltu
};
#if defined(VOICE)
#if defined(CPUARM)
#define CZ_PUSH_UNIT_PROMPT(p, u) cz_pushUnitPrompt((p), (u), id)
#define CZ_PUSH_UNIT_PROMPT(u, p) cz_pushUnitPrompt((u), (p), id)
#else
#define CZ_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define CZ_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
#define MUZSKY 0x80
#define ZENSKY 0x81
#define STREDNI 0x82
#define MALE 0x80
#define FEMALE 0x81
#define NEUTRAL 0x82
I18N_PLAY_FUNCTION(cz, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(cz, pushUnitPrompt, uint8_t unit, int16_t number)
{
#if defined(CPUARM)
TRACE("CZSAY unit:%d number:%d", unit, number);
if (number == 1)
PUSH_UNIT_PROMPT(unitprompt, 0);
PUSH_UNIT_PROMPT(unit, 0);
else if (number > 1 && number < 5)
PUSH_UNIT_PROMPT(unitprompt, 1);
PUSH_UNIT_PROMPT(unit, 1);
else
PUSH_UNIT_PROMPT(unitprompt, 2);
PUSH_UNIT_PROMPT(unit, 2);
#else
unitprompt = CZ_PROMPT_UNITS_BASE+((unitprompt-1)*4);
unitprompt = CZ_PROMPT_UNITS_BASE+((unit-1)*4);
if (number == 1)
PUSH_NUMBER_PROMPT(unitprompt);
PUSH_NUMBER_PROMPT(unit);
else if (number > 1 && number < 5)
PUSH_NUMBER_PROMPT(unitprompt+1);
PUSH_NUMBER_PROMPT(unit+1);
else
PUSH_NUMBER_PROMPT(unitprompt+2);
PUSH_NUMBER_PROMPT(unit+2);
#endif
}
I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
{
if (number < 0) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_MINUS);
number = -number;
@@ -105,88 +104,72 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
#else
// we assume that we are PREC1
#endif
div_t qr = div((int)number, 10);
if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, ZENSKY);
if (qr.quot == 0)
PUSH_NUMBER_PROMPT(CZ_PROMPT_CELA);
else
CZ_PUSH_UNIT_PROMPT(qr.quot, CZ_PROMPT_CELA);
PLAY_NUMBER(qr.rem, 0, ZENSKY);
PUSH_NUMBER_PROMPT(CZ_PROMPT_UNITS_BASE+((unit-1)*4)+3);
return;
div_t qr = div((int)number, 10);
if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, FEMALE);
if (qr.quot < 2) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_CELA);
}
else
number = qr.quot;
else if (qr.quot > 1 && qr.quot < 5) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_CELE);
}
else {
PUSH_NUMBER_PROMPT(CZ_PROMPT_CELYCH);
};
PLAY_NUMBER(qr.rem, 0, FEMALE);
#if defined(CPUARM)
PUSH_UNIT_PROMPT(unit, 3);
#else
PUSH_NUMBER_PROMPT(CZ_PROMPT_UNITS_BASE+((unit-1)*4)+3);
#endif
return;
}
else {
number = qr.quot;
}
}
int16_t tmp = number;
#if defined(CPUARM)
switch(unit) {
case 0:
case UNIT_RAW:
break;
case 6:
case 8:
case 10:
case 14:
case 18:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
att = ZENSKY;
case UNIT_FEET_PER_SECOND:
case UNIT_MPH:
case UNIT_FEET:
case UNIT_MAH:
case UNIT_RPMS:
case UNIT_FLOZ:
case UNIT_HOURS:
case UNIT_MINUTES:
case UNIT_SECONDS:
att = FEMALE;
break;
case 13:
case 19:
att = STREDNI;
case UNIT_PERCENT:
case UNIT_G:
att = NEUTRAL;
break;
default:
att = MUZSKY;
att = MALE;
break;
}
#else
switch(unit) {
case 0:
break;
case 4:
case 10:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
att = ZENSKY;
break;
case 8:
case 19:
att = STREDNI;
break;
default:
att = MUZSKY;
break;
}
#endif
if ((number == 1) && (att == MUZSKY)) {
if ((number == 1) && (att == MALE)) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_JEDEN);
number = -1;
}
if ((number == 1) && (att == STREDNI)) {
if ((number == 1) && (att == NEUTRAL)) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_JEDNO);
number = -1;
}
if ((number == 2) && ((att == ZENSKY) || (att == STREDNI))) {
if ((number == 2) && ((att == FEMALE) || (att == NEUTRAL))) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_DVE);
number = -1;
}
if (number >= 1000) {
if (number >= 2000)
if (number >= 2000)
PLAY_NUMBER(number / 1000, 0, 0);
if (number >= 2000 && number < 5000)
PUSH_NUMBER_PROMPT(CZ_PROMPT_TISICE);
@@ -202,13 +185,13 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number == 0)
number = -1;
}
if (number >= 0) {
PUSH_NUMBER_PROMPT(CZ_PROMPT_NULA+number);
}
if (unit) {
CZ_PUSH_UNIT_PROMPT(tmp, unit);
CZ_PUSH_UNIT_PROMPT(unit, tmp);
}
}
@@ -222,17 +205,17 @@ I18N_PLAY_FUNCTION(cz, playDuration, int seconds PLAY_DURATION_ATT)
uint8_t tmp = seconds / 3600;
seconds %= 3600;
if (tmp > 0 || IS_PLAY_TIME()) {
PLAY_NUMBER(tmp, UNIT_HOURS, ZENSKY);
PLAY_NUMBER(tmp, UNIT_HOURS, FEMALE);
}
tmp = seconds / 60;
seconds %= 60;
if (tmp > 0) {
PLAY_NUMBER(tmp, UNIT_MINUTES, ZENSKY);
PLAY_NUMBER(tmp, UNIT_MINUTES, FEMALE);
}
if (seconds > 0) {
PLAY_NUMBER(seconds, UNIT_SECONDS, ZENSKY);
PLAY_NUMBER(seconds, UNIT_SECONDS, FEMALE);
}
}
+5 -5
View File
@@ -51,12 +51,12 @@ enum EnglishPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define EN_PUSH_UNIT_PROMPT(p, u) en_pushUnitPrompt((p), (u), id)
#define EN_PUSH_UNIT_PROMPT(u, p) en_pushUnitPrompt((u), (p), id)
#else
#define EN_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define EN_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
I18N_PLAY_FUNCTION(en, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(en, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -133,9 +133,9 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number >= 0) {
PUSH_NUMBER_PROMPT(EN_PROMPT_ZERO + number);
}
if (unit) {
EN_PUSH_UNIT_PROMPT(tmp, unit);
EN_PUSH_UNIT_PROMPT(unit, tmp);
}
}
+5 -5
View File
@@ -51,12 +51,12 @@ enum HungarianPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define HU_PUSH_UNIT_PROMPT(p, u) hu_pushUnitPrompt((p), (u), id)
#define HU_PUSH_UNIT_PROMPT(u, p) hu_pushUnitPrompt((u), (p), id)
#else
#define HU_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define HU_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
I18N_PLAY_FUNCTION(hu, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(hu, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -133,9 +133,9 @@ I18N_PLAY_FUNCTION(hu, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number >= 0) {
PUSH_NUMBER_PROMPT(HU_PROMPT_ZERO + number);
}
if (unit) {
HU_PUSH_UNIT_PROMPT(tmp, unit);
HU_PUSH_UNIT_PROMPT(unit, tmp);
}
}
+4 -4
View File
@@ -63,12 +63,12 @@ enum ItalianPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define IT_PUSH_UNIT_PROMPT(p, u) it_pushUnitPrompt((p), (u), id)
#define IT_PUSH_UNIT_PROMPT(u, p) it_pushUnitPrompt((u), (p), id)
#else
#define IT_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define IT_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
I18N_PLAY_FUNCTION(it, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(it, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -173,7 +173,7 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
}
}
if (unit) {
IT_PUSH_UNIT_PROMPT(orignumber, unit);
IT_PUSH_UNIT_PROMPT(unit, orignumber);
}
}
+5 -5
View File
@@ -38,12 +38,12 @@ enum DutchPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define NL_PUSH_UNIT_PROMPT(p, u) nl_pushUnitPrompt((p), (u), id)
#define NL_PUSH_UNIT_PROMPT(u, p) nl_pushUnitPrompt((u), (p), id)
#else
#define NL_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define NL_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
I18N_PLAY_FUNCTION(nl, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(nl, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -121,9 +121,9 @@ I18N_PLAY_FUNCTION(nl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number >= 0) {
PUSH_NUMBER_PROMPT(NL_PROMPT_ZERO + number);
}
if (unit) {
NL_PUSH_UNIT_PROMPT(tmp, unit);
NL_PUSH_UNIT_PROMPT(unit, tmp);
}
}
+15 -15
View File
@@ -68,16 +68,16 @@ enum PolishPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define PL_PUSH_UNIT_PROMPT(p, u) pl_pushUnitPrompt((p), (u), id)
#define PL_PUSH_UNIT_PROMPT(u, p) pl_pushUnitPrompt((u), (p), id)
#else
#define PL_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define PL_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
#define MESKI 0x80
#define ZENSKI 0x81
#define NIJAKI 0x82
I18N_PLAY_FUNCTION(pl, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(pl, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -146,13 +146,13 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
#else
// we assume that we are PREC1
#endif
div_t qr = div((int)number, 10);
div_t qr = div((int)number, 10);
if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, ZENSKI);
if (qr.quot == 0)
PUSH_NUMBER_PROMPT(PL_PROMPT_CALA);
else
PL_PUSH_UNIT_PROMPT(qr.quot, PL_PROMPT_CALA);
PL_PUSH_UNIT_PROMPT(PL_PROMPT_CALA, qr.quot);
PLAY_NUMBER(qr.rem, 0, ZENSKI);
PUSH_NUMBER_PROMPT(PL_PROMPT_UNITS_BASE+((unit-1)*4)+3);
return;
@@ -163,7 +163,7 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
}
int16_t tmp = number;
switch(unit) {
case 0:
break;
@@ -197,26 +197,26 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
PUSH_NUMBER_PROMPT(PL_PROMPT_JEDNA);
number = -1;
}
if ((number == 1) && (att == NIJAKI)) {
PUSH_NUMBER_PROMPT(PL_PROMPT_JEDNO);
number = -1;
}
if ((number == 2) && (att == ZENSKI)) {
PUSH_NUMBER_PROMPT(PL_PROMPT_DWIE);
number = -1;
}
if (number >= 1000) {
if (number >= 2000)
if (number >= 2000)
PLAY_NUMBER(number / 1000, 0, 0);
if (number >= 2000 && number < 5000)
PUSH_NUMBER_PROMPT(PL_PROMPT_TYSIACE);
else if (number >= 5000)
PUSH_NUMBER_PROMPT(PL_PROMPT_TYSIECY);
else
else
PUSH_NUMBER_PROMPT(PL_PROMPT_TYSIAC);
number %= 1000;
@@ -229,21 +229,21 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number == 0)
number = -1;
}
if (number >= 0) {
int test_2 =0;
test_2 =number % 10;
int ten=0;
ten=(number - (number % 10))/10;
if (att == ZENSKI && test_2==2 && ten >= 2 ) {
PUSH_NUMBER_PROMPT(PL_PROMPT_DZIESIATKI_ZENSKIE+ten);
}else
}else
PUSH_NUMBER_PROMPT(PL_PROMPT_ZERO+number);
}
if (unit) {
PL_PUSH_UNIT_PROMPT(tmp, unit);
PL_PUSH_UNIT_PROMPT(unit, tmp);
}
}
+7 -7
View File
@@ -52,12 +52,12 @@ enum SwedishPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define SE_PUSH_UNIT_PROMPT(p, u) se_pushUnitPrompt((p), (u), id)
#define SE_PUSH_UNIT_PROMPT(u, p) se_pushUnitPrompt((u), (p), id)
#else
#define SE_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define SE_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
I18N_PLAY_FUNCTION(se, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(se, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -115,9 +115,9 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
number = qr.quot;
}
}
int16_t tmpNumber = number;
if (number >= 1000) {
PLAY_NUMBER(number / 1000, 0, 0);
PUSH_NUMBER_PROMPT(SE_PROMPT_THOUSAND);
@@ -134,9 +134,9 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number >= 0) {
PUSH_NUMBER_PROMPT(SE_PROMPT_ZERO + number);
}
if (unit) {
SE_PUSH_UNIT_PROMPT(tmpNumber, unit);
SE_PUSH_UNIT_PROMPT(unit, tmpNumber);
}
}
+14 -14
View File
@@ -58,16 +58,16 @@ enum SlovakPrompts {
#if defined(VOICE)
#if defined(CPUARM)
#define SK_PUSH_UNIT_PROMPT(p, u) sk_pushUnitPrompt((p), (u), id)
#define SK_PUSH_UNIT_PROMPT(u, p) sk_pushUnitPrompt((u), (p), id)
#else
#define SK_PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u))
#define SK_PUSH_UNIT_PROMPT(u, p) pushUnitPrompt((u), (p))
#endif
#define MUZSKY 0x80
#define ZENSKY 0x81
#define STREDNI 0x82
I18N_PLAY_FUNCTION(sk, pushUnitPrompt, int16_t number, uint8_t unitprompt)
I18N_PLAY_FUNCTION(sk, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
#if defined(CPUARM)
if (number == 1)
@@ -120,13 +120,13 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
#else
// we assume that we are PREC1
#endif
div_t qr = div((int)number, 10);
div_t qr = div((int)number, 10);
if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, ZENSKY);
if (qr.quot == 0)
PUSH_NUMBER_PROMPT(SK_PROMPT_CELA);
else
SK_PUSH_UNIT_PROMPT(qr.quot, SK_PROMPT_CELA);
SK_PUSH_UNIT_PROMPT(SK_PROMPT_CELA, qr.quot);
PLAY_NUMBER(qr.rem, 0, ZENSKY);
PUSH_NUMBER_PROMPT(SK_PROMPT_UNITS_BASE+((unit-1)*4)+3);
return;
@@ -137,8 +137,8 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
}
int16_t tmp = number;
#if defined(CPUARM)
#if defined(CPUARM)
switch(unit) {
case 0:
break;
@@ -189,20 +189,20 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
PUSH_NUMBER_PROMPT(SK_PROMPT_JEDEN);
number = -1;
}
if ((number == 1) && (att == STREDNI)) {
PUSH_NUMBER_PROMPT(SK_PROMPT_JEDNO);
number = -1;
}
if ((number == 2) && ((att == ZENSKY) || (att == STREDNI))) {
PUSH_NUMBER_PROMPT(SK_PROMPT_DVE);
number = -1;
}
if (number >= 1000) {
if (number >= 1000) {
if (number >= 3000)
PLAY_NUMBER(number / 1000, 0, 0);
PLAY_NUMBER(number / 1000, 0, 0);
if (number >= 2000 && number < 3000)
PUSH_NUMBER_PROMPT(SK_PROMPT_DVETISIC);
else
@@ -218,13 +218,13 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number == 0)
number = -1;
}
if (number >= 0) {
PUSH_NUMBER_PROMPT(SK_PROMPT_NULA+number);
}
if (unit) {
SK_PUSH_UNIT_PROMPT(tmp, unit);
SK_PUSH_UNIT_PROMPT(unit, tmp);
}
}
+84
View File
@@ -0,0 +1,84 @@
The purpose of this document is to document the principle of TTS for CZ languages to non CZ speaker, with a strict focus on OpenTX TTS
## Large 'multiparts' numbers
This is for numbers requiring assembly of basic number blocks, like 110 in english : `ONE` `HUNDRED` `TEN`
## Plural units forms
4 forms of plural exist in otx cz tts, bellow is the exemple for volts
`(u"volt", u"volt0"), (u"volty", u"volt1"), (u"voltů", u"volt2"),(u"voltu", u"volt3")`
In this document, we will use unit0 to unit3 to describe those 4 variations
## Interger numbers with unit
The number takes a from like X UNIT
#### "one ..."
The number "one" has 3 gender depending on the unit F/M/N
The forms are "jedna","jeden", "jedno"
See unit table bellow to find out wich gender of one should be used
unit0 is used with the 3 gender of one.
#### "two ..."
The number "two" has 3 gender depending on the unit
The forms are "dva","dvě"
See unit table bellow to find out wich gender of two should be used
unit1 is used with the 2 gender of two.
### "tree to five"
unit1 is used
### "five and more"
unit2 is used
## decimal numbers with unit
X.Y UNIT
In this case unit is unit3. X and Y is allways FEM.
"point" has three forms depending on the value of X :
0 and 1 : "celá"
2, 3 , 4 : "celé"
5 :"celých"
Note : opentx audio only deals with PREC1 numbers, so Y can only be integer 1 to 9
# Unit table
| Index | Unit | Defined as | One | Two | Gender
| --- | --- |--- |--- |--- |---
| 0 | Raw unit (no unit) | UNIT_RAW | jedna | dvě | Female
| 1 | Volts | UNIT_VOLTS | jeden | dva | Male
| 2 | Amps | UNIT_AMPS | jeden | dva | Male
| 3 | Milliamps | UNIT_MILLIAMPS | jeden | dva | Male
| 4 | Knots | UNIT_KTS | jeden | dva | Male
| 5 | Meters per Second | UNIT_METERS_PER_SECOND | jeden | dva | Male
| 6 | Feet per Second | UNIT_FEET_PER_SECOND | jedna | dvě | Female
| 7 | Kilometers per Hour| UNIT_KMH | jeden | dva | Male
| 8 | Miles per Hour | UNIT_MPH | jedna | dvě | Female
| 9 | Meters | UNIT_METERS | jeden | dva | Male
| 10 | Feet | UNIT_FEET | jedna | dvě | Female
| 11 | Degrees Celsius | UNIT_CELSIUS | jeden | dva | Male
| 12 | Degrees Fahrenheit | UNIT_FAHRENHEIT | jeden | dva | Male
| 13 | Percent | UNIT_PERCENT | jedno | dvě | Neutral
| 14 | Milliamp per Hour | UNIT_MAH | jedna | dvě | Female
| 15 | Watts | UNIT_WATTS | jeden | dva | Male
| 16 | Milliwatts | UNIT_MILLIWATTS | jeden | dva | Male
| 17 | dB | UNIT_DB | jeden | dva | Male
| 18 | RPM | UNIT_RPMS | jedna | dvě | Female
| 19 | G | UNIT_G | jedno | dvě | Neutral
| 20 | Degrees | UNIT_DEGREE | jeden | dva | Male
| 21 | Radians | UNIT_RADIANS | jeden | dva | Male
| 22 | Milliliters | UNIT_MILLILITERS | jeden | dva | Male
| 23 | Fluid Ounces | UNIT_FLOZ | jedna | dvě | Female
| 24 | Hours | UNIT_HOURS | jedna | dvě | Female
| 25 | Minutes | UNIT_MINUTES | jedna | dvě | Female
| 26 | Seconds | UNIT_SECONDS | jedna | dvě | Female