Fix problem with GPS speed unit used with voice
This commit is contained in:
@@ -50,8 +50,8 @@ enum EnglishPrompts {
|
||||
EN_PROMPT_AMPS = EN_PROMPT_UNITS_BASE+(UNIT_AMPS*2),
|
||||
EN_PROMPT_METERS_PER_SECOND = EN_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*2),
|
||||
EN_PROMPT_SPARE1 = EN_PROMPT_UNITS_BASE+(UNIT_RAW*2),
|
||||
EN_PROMPT_KMH = EN_PROMPT_UNITS_BASE+(UNIT_KMH*2),
|
||||
EN_PROMPT_METERS = EN_PROMPT_UNITS_BASE+(UNIT_METERS*2),
|
||||
EN_PROMPT_KMH = EN_PROMPT_UNITS_BASE+(UNIT_SPEED*2),
|
||||
EN_PROMPT_METERS = EN_PROMPT_UNITS_BASE+(UNIT_DIST*2),
|
||||
EN_PROMPT_DEGREES = EN_PROMPT_UNITS_BASE+(UNIT_DEGREES*2),
|
||||
EN_PROMPT_PERCENT = EN_PROMPT_UNITS_BASE+(UNIT_PERCENT*2),
|
||||
EN_PROMPT_MILLIAMPS = EN_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*2),
|
||||
@@ -59,7 +59,7 @@ enum EnglishPrompts {
|
||||
EN_PROMPT_WATTS = EN_PROMPT_UNITS_BASE+(UNIT_WATTS*2),
|
||||
EN_PROMPT_DB = EN_PROMPT_UNITS_BASE+(UNIT_DBM*2),
|
||||
EN_PROMPT_FEET = EN_PROMPT_UNITS_BASE+(UNIT_FEET*2),
|
||||
EN_PROMPT_KTS = EN_PROMPT_UNITS_BASE+(UNIT_KTS*2),
|
||||
EN_PROMPT_MPH = EN_PROMPT_UNITS_BASE+(UNIT_KTS*2),
|
||||
EN_PROMPT_HOURS = EN_PROMPT_UNITS_BASE+(UNIT_HOURS*2),
|
||||
EN_PROMPT_MINUTES = EN_PROMPT_UNITS_BASE+(UNIT_MINUTES*2),
|
||||
EN_PROMPT_SECONDS = EN_PROMPT_UNITS_BASE+(UNIT_SECONDS*2),
|
||||
@@ -97,12 +97,15 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
unit--;
|
||||
convertUnit(number, unit);
|
||||
if (IS_IMPERIAL_ENABLE()) {
|
||||
if (unit == UNIT_METERS) {
|
||||
if (unit == UNIT_DIST) {
|
||||
unit = UNIT_FEET;
|
||||
}
|
||||
if (unit == UNIT_SPEED) {
|
||||
unit = UNIT_KTS;
|
||||
}
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) {
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_SPEED && number >= 100))) {
|
||||
number /= 10;
|
||||
att -= PREC1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user