Small corrections

This commit is contained in:
bsongis
2012-04-20 06:16:22 +00:00
parent 98e1c57db3
commit 9deddaaecd
9 changed files with 35 additions and 24 deletions
+1 -20
View File
@@ -826,6 +826,7 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value)
result = value * 3;
break;
case TELEM_ALT:
case TELEM_GPSALT:
result = value * 4;
break;
case TELEM_RPM:
@@ -849,26 +850,6 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value)
return result;
}
void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t att)
{
#ifdef IMPERIAL_UNITS
if (unit == UNIT_DEGREES) {
val += 18 ;
val *= 115 ;
val >>= 6 ;
}
if (unit == UNIT_METERS) {
// m to ft *105/32
val = val * 3 + ( val >> 2 ) + (val >> 5) ;
unit = UNIT_MAX;
}
#endif
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
if (~att & NO_UNIT && unit != UNIT_RAW)
lcd_putsiAtt(lcd_lastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
}
static const pm_uint8_t bchunit_ar[] PROGMEM = {
UNIT_METERS, // Alt
UNIT_RAW, // Rpm