1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-26 01:35:16 +03:00

Fixes #2382: Vario only showing positive values (reverted from commit a88cace888)

This commit is contained in:
Damjan Adamic 2015-06-25 20:10:59 +02:00
parent a88cace888
commit 56c249326f

View file

@ -600,11 +600,9 @@ int32_t TelemetrySensor::getValue(int32_t value, uint8_t unit, uint8_t prec) con
if (type == TELEM_TYPE_CUSTOM) {
value += custom.offset;
if (value < 0 && unit >= UNIT_VOLTS && unit <= UNIT_MPH) {
// allow negative value for Vario VSPEED
if (id < VARIO_FIRST_ID && id > VARIO_LAST_ID) {
value = 0;
}
value = 0;
}
}
return value;