mirror of
https://github.com/nasa/openmct.git
synced 2025-05-11 21:13:02 +00:00
[VIPEROMCT-41] When new telemetry data arrives, don't evaluate criteria that are defined for a different telemtry endpoint. (#3797)
This commit is contained in:
parent
1b57999059
commit
721bdd737a
@ -82,7 +82,9 @@ export default class Condition extends EventEmitter {
|
|||||||
if (this.isAnyOrAllTelemetry(criterion)) {
|
if (this.isAnyOrAllTelemetry(criterion)) {
|
||||||
criterion.updateResult(datum, this.conditionManager.telemetryObjects);
|
criterion.updateResult(datum, this.conditionManager.telemetryObjects);
|
||||||
} else {
|
} else {
|
||||||
criterion.updateResult(datum);
|
if (criterion.usesTelemetry(datum.id)) {
|
||||||
|
criterion.updateResult(datum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -102,7 +104,7 @@ export default class Condition extends EventEmitter {
|
|||||||
|
|
||||||
isTelemetryUsed(id) {
|
isTelemetryUsed(id) {
|
||||||
return this.criteria.some(criterion => {
|
return this.criteria.some(criterion => {
|
||||||
return this.isAnyOrAllTelemetry(criterion) || criterion.telemetryObjectIdAsString === id;
|
return this.isAnyOrAllTelemetry(criterion) || criterion.usesTelemetry(id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,10 @@ export default class TelemetryCriterion extends EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usesTelemetry(id) {
|
||||||
|
return this.telemetryObjectIdAsString && (this.telemetryObjectIdAsString === id);
|
||||||
|
}
|
||||||
|
|
||||||
subscribeForStaleData() {
|
subscribeForStaleData() {
|
||||||
if (this.stalenessSubscription) {
|
if (this.stalenessSubscription) {
|
||||||
this.stalenessSubscription.clear();
|
this.stalenessSubscription.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user