fix(telemetry): wrong scaling after changing unit to RPM (#4875)
This commit is contained in:
@@ -209,7 +209,7 @@ void TelemetryItem::setValue(const TelemetrySensor &sensor, int32_t val,
|
||||
setFresh();
|
||||
return;
|
||||
}
|
||||
else if (unit == UNIT_RPMS) {
|
||||
else if (sensor.unit == UNIT_RPMS) {
|
||||
if (sensor.custom.ratio != 0) {
|
||||
newVal = (newVal * sensor.custom.offset) / sensor.custom.ratio;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user