mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
Merge remote-tracking branch 'origin/telemetry-comps' into combined-rodap-stuff
This commit is contained in:
commit
f9efc71f54
@ -122,8 +122,18 @@ function calculate(dataFrame, parameters, expression) {
|
|||||||
console.debug('🤦♂️ Missing data for some parameters, skipping calculation');
|
console.debug('🤦♂️ Missing data for some parameters, skipping calculation');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const value = evaluate(expression, scope);
|
const rawComputedValue = evaluate(expression, scope);
|
||||||
sumResults.push({ [referenceParameter.timeKey]: referenceTime, value });
|
let computedValue = rawComputedValue;
|
||||||
|
if (computedValue.entries) {
|
||||||
|
// if there aren't any entries, return with nothing
|
||||||
|
if (computedValue.entries.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.debug('📊 Computed value is an array of entries', computedValue.entries);
|
||||||
|
// make array of arrays of entries
|
||||||
|
computedValue = computedValue.entries?.[0];
|
||||||
|
}
|
||||||
|
sumResults.push({ [referenceParameter.timeKey]: referenceTime, value: computedValue });
|
||||||
});
|
});
|
||||||
return sumResults;
|
return sumResults;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user