updated new method

This commit is contained in:
znetsixe
2025-06-12 17:05:28 +02:00
parent a97326af08
commit c4f16fb36d
4 changed files with 29 additions and 14 deletions

View File

@@ -39,19 +39,18 @@
*/
const EventEmitter = require('events');
const Logger = require('../../../generalFunctions/helper/logger');
const {logger,configUtils} = require('generalFunctions');
const defaultConfig = require('./measurementConfig.json');
const ConfigUtils = require('../../../generalFunctions/helper/configUtils');
class Measurement {
constructor(config={}) {
this.emitter = new EventEmitter(); // Own EventEmitter
this.configUtils = new ConfigUtils(defaultConfig);
this.configUtils = new configUtils(defaultConfig);
this.config = this.configUtils.initConfig(config);
// Init after config is set
this.logger = new Logger(this.config.general.logging.enabled,this.config.general.logging.logLevel, this.config.general.name);
this.logger = new logger(this.config.general.logging.enabled,this.config.general.logging.logLevel, this.config.general.name);
// Smoothing
this.storedValues = [];