Hungarian TTS fixes by hori64
This commit is contained in:
@@ -44,35 +44,8 @@ enum HungarianPrompts {
|
||||
HU_PROMPT_AND = HU_PROMPT_NUMBERS_BASE+110,
|
||||
HU_PROMPT_MINUS = HU_PROMPT_NUMBERS_BASE+111,
|
||||
HU_PROMPT_POINT = HU_PROMPT_NUMBERS_BASE+112,
|
||||
|
||||
HU_PROMPT_UNITS_BASE = 115,
|
||||
HU_PROMPT_VOLTS = HU_PROMPT_UNITS_BASE+UNIT_VOLTS, //(one)volt,(two)volts
|
||||
HU_PROMPT_AMPS = HU_PROMPT_UNITS_BASE+(UNIT_AMPS*2),
|
||||
HU_PROMPT_METERS_PER_SECOND = HU_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*2),
|
||||
HU_PROMPT_SPARE1 = HU_PROMPT_UNITS_BASE+(UNIT_RAW*2),
|
||||
HU_PROMPT_KMH = HU_PROMPT_UNITS_BASE+(UNIT_SPEED*2),
|
||||
HU_PROMPT_METERS = HU_PROMPT_UNITS_BASE+(UNIT_DIST*2),
|
||||
HU_PROMPT_DEGREES = HU_PROMPT_UNITS_BASE+(UNIT_TEMPERATURE*2),
|
||||
HU_PROMPT_PERCENT = HU_PROMPT_UNITS_BASE+(UNIT_PERCENT*2),
|
||||
HU_PROMPT_MILLIAMPS = HU_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*2),
|
||||
HU_PROMPT_MAH = HU_PROMPT_UNITS_BASE+(UNIT_MAH*2),
|
||||
HU_PROMPT_WATTS = HU_PROMPT_UNITS_BASE+(UNIT_WATTS*2),
|
||||
HU_PROMPT_DB = HU_PROMPT_UNITS_BASE+(UNIT_DB*2),
|
||||
HU_PROMPT_FEET = HU_PROMPT_UNITS_BASE+(UNIT_FEET*2),
|
||||
HU_PROMPT_MPH = HU_PROMPT_UNITS_BASE+(UNIT_KTS*2),
|
||||
HU_PROMPT_HOURS = HU_PROMPT_UNITS_BASE+(UNIT_HOURS*2),
|
||||
HU_PROMPT_MINUTES = HU_PROMPT_UNITS_BASE+(UNIT_MINUTES*2),
|
||||
HU_PROMPT_SECONDS = HU_PROMPT_UNITS_BASE+(UNIT_SECONDS*2),
|
||||
HU_PROMPT_RPMS = HU_PROMPT_UNITS_BASE+(UNIT_RPMS*2),
|
||||
HU_PROMPT_G = HU_PROMPT_UNITS_BASE+(UNIT_G*2),
|
||||
#if defined(CPUARM)
|
||||
HU_PROMPT_MILLILITERS = HU_PROMPT_UNITS_BASE+(UNIT_MILLILITERS*2),
|
||||
HU_PROMPT_FLOZ = HU_PROMPT_UNITS_BASE+(UNIT_FLOZ*2),
|
||||
HU_PROMPT_FEET_PER_SECOND = HU_PROMPT_UNITS_BASE+(UNIT_FEET_PER_SECOND*2),
|
||||
#endif
|
||||
|
||||
HU_PROMPT_POINT_BASE = 160, //.0 - .9
|
||||
|
||||
HU_PROMPT_UNITS_BASE = 113,
|
||||
HU_PROMPT_POINT_BASE = 165, //.0 - .9
|
||||
};
|
||||
|
||||
#if defined(VOICE)
|
||||
@@ -154,12 +127,17 @@ I18N_PLAY_FUNCTION(hu, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
|
||||
if (unit) {
|
||||
HU_PUSH_UNIT_PROMPT(tmp, (HU_PROMPT_UNITS_BASE+((unit-1)*2)));
|
||||
HU_PUSH_UNIT_PROMPT(tmp, HU_PROMPT_UNITS_BASE + unit*2);
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(hu, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds == 0) {
|
||||
PLAY_NUMBER(seconds, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(HU_PROMPT_MINUS);
|
||||
seconds = -seconds;
|
||||
@@ -168,19 +146,20 @@ I18N_PLAY_FUNCTION(hu, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1 , 0);
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS, 0);
|
||||
}
|
||||
|
||||
tmp = seconds / 60;
|
||||
seconds %= 60;
|
||||
if (tmp > 0) {
|
||||
PLAY_NUMBER(tmp, UNIT_MINUTES+1 , 0);
|
||||
if (seconds > 0)
|
||||
PUSH_NUMBER_PROMPT(HU_PROMPT_AND);
|
||||
PLAY_NUMBER(tmp, UNIT_MINUTES, 0);
|
||||
// This is not necessary in the Hungarian
|
||||
//if (seconds > 0)
|
||||
//PUSH_NUMBER_PROMPT(HU_PROMPT_AND);
|
||||
}
|
||||
|
||||
if (seconds > 0) {
|
||||
PLAY_NUMBER(seconds, UNIT_SECONDS+1 , 0);
|
||||
PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user