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

We need to ignore the instance, not the data Id ;)

This commit is contained in:
Andre Bernet 2015-07-25 18:11:02 +02:00
parent 6f21556b81
commit a3fa0bd79d

View file

@ -488,7 +488,7 @@ void setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t instance
for (int index=0; index<MAX_SENSORS; index++) {
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[index];
if (telemetrySensor.type == TELEM_TYPE_CUSTOM && (telemetrySensor.id == id || g_model.ignoreSensorIds) && telemetrySensor.instance == instance) {
if (telemetrySensor.type == TELEM_TYPE_CUSTOM && telemetrySensor.id == id && (telemetrySensor.instance == instance || g_model.ignoreSensorIds)) {
telemetryItems[index].setValue(telemetrySensor, value, unit, prec);
available = true;
// we continue search here, because more than one sensor can have the same id and instance