Remarks from Damjan in e8aaa67450 taken into account

This commit is contained in:
Bertrand Songis
2016-01-15 08:44:45 +01:00
parent d85ee61cb3
commit efb37a4419
5 changed files with 50 additions and 62 deletions
+4 -4
View File
@@ -969,14 +969,14 @@ void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t v
{
lcdint_t converted_value = applyChannelRatio(channel, val);
if (ANA_CHANNEL_UNIT(channel) >= UNIT_RAW) {
converted_value = div10_and_round(converted_value);
converted_value = div_and_round<10>(converted_value);
}
else {
if (abs(converted_value) < 1000) {
att |= PREC2;
}
else {
converted_value = div10_and_round(converted_value);
converted_value = div_and_round<10>(converted_value);
att |= PREC1;
}
}
@@ -1019,7 +1019,7 @@ void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t v
break;
case TELEM_VSPEED-1:
putsValueWithUnit(x, y, div10_and_round(val), UNIT_RAW, att|PREC1);
putsValueWithUnit(x, y, div_and_round<10>(val), UNIT_RAW, att|PREC1);
break;
case TELEM_ASPEED-1:
@@ -1041,7 +1041,7 @@ void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t v
#if defined(FRSKY_SPORT)
case TELEM_ALT-1:
putsValueWithUnit(x, y, div10_and_round(val), UNIT_DIST, att|PREC1);
putsValueWithUnit(x, y, div_and_round<10>(val), UNIT_DIST, att|PREC1);
break;
#elif defined(WS_HOW_HIGH)
case TELEM_ALT-1: