fix(telemetry): wrong scaling after changing unit to RPM (#4875)

This commit is contained in:
Michael
2024-05-05 10:54:03 +10:00
committed by GitHub
parent 49d7011090
commit 402953cfa9
+1 -1
View File
@@ -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;
}