Merge pull request #848 from projectkk2glider/proper_rounding_of_spoken_values
Proper rounding of displayed and spoken values
This commit is contained in:
@@ -129,7 +129,7 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -119,7 +119,7 @@ I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -105,8 +105,8 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_SPEED && number >= 100))) {
|
||||
number /= 10;
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -143,7 +143,7 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -125,7 +125,7 @@ I18N_PLAY_FUNCTION(fr, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -115,7 +115,7 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -138,7 +138,7 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -128,7 +128,7 @@ I18N_PLAY_FUNCTION(pt, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -93,7 +93,7 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -144,7 +144,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number /= 10;
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user