mirror of
https://github.com/nasa/openmct.git
synced 2025-01-28 23:24:26 +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) {
|
if (missingData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const compsOutput = evaluate(expression, scope);
|
const value = evaluate(expression, scope);
|
||||||
sumResults.push({ [referenceParameter.timeKey]: referenceTime, compsOutput });
|
sumResults.push({ [referenceParameter.timeKey]: referenceTime, value });
|
||||||
});
|
});
|
||||||
return sumResults;
|
return sumResults;
|
||||||
}
|
}
|
||||||
|
@ -58,9 +58,8 @@ export default class CompsMetadataProvider {
|
|||||||
const metaDataToReturn = {
|
const metaDataToReturn = {
|
||||||
values: [
|
values: [
|
||||||
{
|
{
|
||||||
key: 'compsOutput',
|
key: 'value',
|
||||||
source: 'compsOutput',
|
name: 'Value',
|
||||||
name: 'Output',
|
|
||||||
derived: true,
|
derived: true,
|
||||||
formatString: specificCompsManager.getOutputFormat(),
|
formatString: specificCompsManager.getOutputFormat(),
|
||||||
hints: {
|
hints: {
|
||||||
|
@ -299,7 +299,7 @@ function updateExpression() {
|
|||||||
|
|
||||||
function getValueFormatter() {
|
function getValueFormatter() {
|
||||||
const metaData = openmct.telemetry.getMetadata(domainObject);
|
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);
|
return openmct.telemetry.getValueFormatter(outputMetaDatum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ function telemetryProcessor(data) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// new data will come in as array, so just take the last element
|
// 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);
|
const formattedOutput = getValueFormatter().format(currentOutput);
|
||||||
currentCompOutput.value = formattedOutput;
|
currentCompOutput.value = formattedOutput;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user