Merge branch 'telemetry-comps' into combined-rodap-stuff

This commit is contained in:
Scott Bell 2024-10-09 17:56:17 +02:00
commit e17702dabf
3 changed files with 6 additions and 7 deletions

View File

@ -121,8 +121,8 @@ function calculate(dataFrame, parameters, expression) {
if (missingData) {
return;
}
const compsOutput = evaluate(expression, scope);
sumResults.push({ [referenceParameter.timeKey]: referenceTime, compsOutput });
const value = evaluate(expression, scope);
sumResults.push({ [referenceParameter.timeKey]: referenceTime, value });
});
return sumResults;
}

View File

@ -58,9 +58,8 @@ export default class CompsMetadataProvider {
const metaDataToReturn = {
values: [
{
key: 'compsOutput',
source: 'compsOutput',
name: 'Output',
key: 'value',
name: 'Value',
derived: true,
formatString: specificCompsManager.getOutputFormat(),
hints: {

View File

@ -299,7 +299,7 @@ function updateExpression() {
function getValueFormatter() {
const metaData = openmct.telemetry.getMetadata(domainObject);
const outputMetaDatum = metaData.values().find((metaDatum) => metaDatum.key === 'compsOutput');
const outputMetaDatum = metaData.values().find((metaDatum) => metaDatum.key === 'value');
return openmct.telemetry.getValueFormatter(outputMetaDatum);
}
@ -347,7 +347,7 @@ function telemetryProcessor(data) {
return;
}
// new data will come in as array, so just take the last element
const currentOutput = data[data.length - 1]?.compsOutput;
const currentOutput = data[data.length - 1]?.value;
const formattedOutput = getValueFormatter().format(currentOutput);
currentCompOutput.value = formattedOutput;
}