This commit is contained in:
znetsixe
2025-09-22 16:06:18 +02:00
parent ddfc612894
commit 38408c7bc3
3 changed files with 4 additions and 3 deletions

View File

@@ -7,8 +7,6 @@
category: "EVOLV",
color: "#4f8582",
defaults: {
// Define default properties
name: { value: ""}, // use asset category as name ?
// Define specific properties
speed: { value: 1, required: true },

View File

@@ -45,7 +45,6 @@ class nodeClass {
// Merge UI config over defaults
this.config = {
general: {
name: uiConfig.name,
id: node.id, // node.id is for the child registration process
unit: uiConfig.unit, // add converter options later to convert to default units (need like a model that defines this which units we are going to use and then conver to those standards)
logging: {

View File

@@ -45,6 +45,7 @@ maintenanceAlert: this.state.checkMaintenanceStatus()
//load local dependencies
const EventEmitter = require('events');
const {loadCurve,logger,configUtils,configManager,state, nrmse, MeasurementContainer, predict, interpolation , childRegistrationUtils} = require('generalFunctions');
const { name } = require('../../generalFunctions/src/convert/lodash/lodash._shimkeys');
class Machine {
@@ -66,6 +67,9 @@ class Machine {
//Init config and check if it is valid
this.config = this.configUtils.initConfig(machineConfig);
//add unique name for this node.
this.config = this.configUtils.updateConfig(this.config, {general:{name: this.config.functionality?.softwareType + "_" + machineConfig.general.id}}); // add unique name if not present
if (!this.model || !this.curve) {
this.logger.warn(`${!this.model ? 'Model not specified' : 'Curve not found for model ' + this.model} in machineConfig. Cannot make predictions.`);
// Set prediction objects to null to prevent method calls