We need to ignore the instance, not the data Id ;)
This commit is contained in:
@@ -488,7 +488,7 @@ void setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t instance
|
|||||||
|
|
||||||
for (int index=0; index<MAX_SENSORS; index++) {
|
for (int index=0; index<MAX_SENSORS; index++) {
|
||||||
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[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);
|
telemetryItems[index].setValue(telemetrySensor, value, unit, prec);
|
||||||
available = true;
|
available = true;
|
||||||
// we continue search here, because more than one sensor can have the same id and instance
|
// we continue search here, because more than one sensor can have the same id and instance
|
||||||
|
|||||||
Reference in New Issue
Block a user