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:
parent
4110de0e64
commit
8b29aa1e9b
5 changed files with 51 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue