mirror of
https://github.com/nasa/openmct.git
synced 2025-01-27 14:49:28 +00:00
Merge branch 'telemetry-comps' into combined-rodap-stuff
This commit is contained in:
commit
e17702dabf
@ -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;
|
||||
}
|
||||
|
@ -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: {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user