Telemetry refactoring - Fixes #1634

This commit is contained in:
bsongis
2014-11-08 12:06:42 +01:00
parent 7d8ca6931b
commit 88d9691d16
105 changed files with 5789 additions and 3449 deletions
+8 -6
View File
@@ -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);