1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 01:05:10 +03:00

Add multiplier to RPM sensor (Fix #1688), fix offset/ratio DSBs

This commit is contained in:
Andre Bernet 2015-03-31 17:49:43 +04:00
parent 4110de0e64
commit 8b29aa1e9b
5 changed files with 51 additions and 12 deletions

View file

@ -172,7 +172,7 @@ void TelemetryItem::setValue(const TelemetrySensor & sensor, int32_t val, uint32
newVal = 0;
}
else if (unit == UNIT_RPMS) {
newVal = newVal / sensor.custom.ratio;
newVal = (newVal * sensor.custom.offset) / sensor.custom.ratio;
}
else {
newVal = sensor.getValue(newVal, unit, prec);