diff --git a/src/plugins/condition/Condition.js b/src/plugins/condition/Condition.js index 838555105f..82e6c4e6f6 100644 --- a/src/plugins/condition/Condition.js +++ b/src/plugins/condition/Condition.js @@ -69,9 +69,7 @@ export default class ConditionClass extends EventEmitter { console.log('no data received'); return; } - if (!this.isTelemetryUsed(datum.id)) { - return; - } + this.criteria.forEach(criterion => { if (this.isAnyOrAllTelemetry(criterion)) { criterion.getResult(datum, this.conditionManager.telemetryObjects); diff --git a/src/plugins/condition/ConditionManager.js b/src/plugins/condition/ConditionManager.js index 65647b1d14..4256998f85 100644 --- a/src/plugins/condition/ConditionManager.js +++ b/src/plugins/condition/ConditionManager.js @@ -248,7 +248,21 @@ export default class ConditionManager extends EventEmitter { }); } + isTelemetryUsed(id) { + for(const condition of this.conditionClassCollection) { + if (condition.isTelemetryUsed(id)) { + return true; + } + } + + return false; + } + telemetryReceived(id, datum) { + if (!this.isTelemetryUsed(id)) { + return; + } + const normalizedDatum = this.createNormalizedDatum(datum, id); const timeSystemKey = this.openmct.time.timeSystem().key; let timestamp = {};