Telemetry refactoring - Fixes #1634
This commit is contained in:
@@ -80,6 +80,7 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
number = -number;
|
||||
}
|
||||
|
||||
#if !defined(CPUARM)
|
||||
if (unit) {
|
||||
unit--;
|
||||
convertUnit(number, unit);
|
||||
@@ -91,18 +92,19 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
unit = UNIT_KTS;
|
||||
}
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) {
|
||||
number = div10_and_round(number);
|
||||
att -= PREC1;
|
||||
}
|
||||
#endif
|
||||
unit++;
|
||||
}
|
||||
#endif
|
||||
|
||||
int8_t mode = MODE(att);
|
||||
if (mode > 0) {
|
||||
#if defined(CPUARM)
|
||||
if (mode == 2) {
|
||||
number /= 10;
|
||||
}
|
||||
#else
|
||||
// we assume that we are PREC1
|
||||
#endif
|
||||
div_t qr = div(number, 10);
|
||||
if (qr.rem) {
|
||||
PLAY_NUMBER(qr.quot, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user