1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00
* negative altitude on top bar was displayed wrong (same bug affected vertical speed)
* add ability to select an altitude sensor with ft unit for top bar
* display actual sensor unit for top bar altitude
This commit is contained in:
Damjan Adamic 2015-11-10 17:24:49 +01:00
parent a1d44d4d9f
commit f854442c79
4 changed files with 12 additions and 12 deletions

View file

@ -647,14 +647,18 @@ bool TelemetrySensor::isPrecConfigurable() const
}
}
uint32_t TelemetrySensor::getPrecMultiplier() const
int32_t TelemetrySensor::getPrecMultiplier() const
{
/*
Important: the return type must be signed, otherwise
mathematic operations with a negative telemetry value won't work
*/
if (prec == 2) return 1;
if (prec == 1) return 10;
return 100;
}
uint32_t TelemetrySensor::getPrecDivisor() const
int32_t TelemetrySensor::getPrecDivisor() const
{
if (prec == 2) return 100;
if (prec == 1) return 10;