working
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
const EventEmitter = require('events');
|
||||
const {logger,configUtils,configManager,MeasurementContainer} = require('generalFunctions');
|
||||
|
||||
/**
|
||||
* Measurement domain model.
|
||||
* Handles scaling, smoothing, outlier filtering and emits normalized measurement output.
|
||||
*/
|
||||
class Measurement {
|
||||
constructor(config={}) {
|
||||
|
||||
@@ -506,7 +510,10 @@ class Measurement {
|
||||
}
|
||||
|
||||
toggleOutlierDetection() {
|
||||
this.config.outlierDetection = !this.config.outlierDetection;
|
||||
// Keep the outlier configuration shape stable and only toggle the enabled flag.
|
||||
const currentState = Boolean(this.config?.outlierDetection?.enabled);
|
||||
this.config.outlierDetection = this.config.outlierDetection || {};
|
||||
this.config.outlierDetection.enabled = !currentState;
|
||||
}
|
||||
|
||||
getOutput() {
|
||||
@@ -586,4 +593,4 @@ function changeInput(){
|
||||
//m.inputValue = 5;
|
||||
}
|
||||
|
||||
// */
|
||||
// */
|
||||
|
||||
Reference in New Issue
Block a user