Skip to content

Commit

Permalink
change to just value
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbell committed Oct 9, 2024
1 parent 3be414e commit 3b06c77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/plugins/comps/CompsMathWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 2 additions & 3 deletions src/plugins/comps/CompsMetadataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/comps/components/CompsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 3b06c77

Please sign in to comment.