Merge remote-tracking branch 'origin/telemetry-comps' into combined-rodap-stuff

This commit is contained in:
Scott Bell 2024-10-01 18:03:58 +02:00
commit d999a6391c

View File

@ -44,11 +44,9 @@ export default class CompsManager extends EventEmitter {
addParameter(telemetryObject) { addParameter(telemetryObject) {
const keyString = this.#openmct.objects.makeKeyString(telemetryObject.identifier); const keyString = this.#openmct.objects.makeKeyString(telemetryObject.identifier);
const metaData = this.#openmct.telemetry.getMetadata(telemetryObject); const metaData = this.#openmct.telemetry.getMetadata(telemetryObject);
const specificTelemetryCollection = this.#telemetryCollections[keyString]; const timeSystem = this.#openmct.time.getTimeSystem();
const specificTimeKey = specificTelemetryCollection.timeKey; const domains = metaData?.valuesForHints(['domain']);
const timeMetaData = metaData.valueMetadatas.find((metaDatum) => { const timeMetaData = domains.find((d) => d.key === timeSystem.key);
return metaDatum.key === specificTimeKey || metaDatum.source === specificTimeKey;
});
// in the valuesMetadata, find the first numeric data type // in the valuesMetadata, find the first numeric data type
const rangeItems = metaData.valueMetadatas.filter( const rangeItems = metaData.valueMetadatas.filter(
(metaDatum) => metaDatum.hints && metaDatum.hints.range (metaDatum) => metaDatum.hints && metaDatum.hints.range