RPM blades
This commit is contained in:
@@ -573,6 +573,7 @@ void telemetryReset()
|
||||
setTelemetryValue(TELEM_PROTO_FRSKY_SPORT, ALT_FIRST_ID, 1, 1000, UNIT_METERS, 2);
|
||||
setTelemetryValue(TELEM_PROTO_FRSKY_SPORT, CELLS_FIRST_ID, 2, 0x80280220, UNIT_CELLS, 0);
|
||||
setTelemetryValue(TELEM_PROTO_FRSKY_SPORT, CURR_FIRST_ID, 3, 100, UNIT_AMPS, 2);
|
||||
setTelemetryValue(TELEM_PROTO_FRSKY_SPORT, RPM_FIRST_ID, 5, 3600, UNIT_RPMS, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -256,6 +256,9 @@ void frskySportSetDefault(int index, uint16_t id, uint8_t instance)
|
||||
telemetrySensor.custom.ratio = 132;
|
||||
telemetrySensor.filter = 1;
|
||||
}
|
||||
if (unit == UNIT_RPMS) {
|
||||
telemetrySensor.custom.ratio = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
telemetrySensor.init(id);
|
||||
|
||||
@@ -141,6 +141,9 @@ void TelemetryItem::setValue(const TelemetrySensor & sensor, int32_t newVal, uin
|
||||
datetime.timestate = 1;
|
||||
newVal = 0;
|
||||
}
|
||||
else if (unit == UNIT_RPMS) {
|
||||
newVal = newVal / sensor.custom.ratio;
|
||||
}
|
||||
else {
|
||||
newVal = sensor.getValue(newVal, unit, prec);
|
||||
if (sensor.autoOffset) {
|
||||
|
||||
Reference in New Issue
Block a user