mirror of
https://github.com/nasa/openmct.git
synced 2025-03-22 03:55:31 +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)) {
|
||||
criterion.updateResult(datum, this.conditionManager.telemetryObjects);
|
||||
} else {
|
||||
criterion.updateResult(datum);
|
||||
if (criterion.usesTelemetry(datum.id)) {
|
||||
criterion.updateResult(datum);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -102,7 +104,7 @@ export default class Condition extends EventEmitter {
|
||||
|
||||
isTelemetryUsed(id) {
|
||||
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() {
|
||||
if (this.stalenessSubscription) {
|
||||
this.stalenessSubscription.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user