updates
This commit is contained in:
@@ -7,8 +7,6 @@
|
|||||||
category: "EVOLV",
|
category: "EVOLV",
|
||||||
color: "#4f8582",
|
color: "#4f8582",
|
||||||
defaults: {
|
defaults: {
|
||||||
// Define default properties
|
|
||||||
name: { value: ""}, // use asset category as name ?
|
|
||||||
|
|
||||||
// Define specific properties
|
// Define specific properties
|
||||||
speed: { value: 1, required: true },
|
speed: { value: 1, required: true },
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ class nodeClass {
|
|||||||
// Merge UI config over defaults
|
// Merge UI config over defaults
|
||||||
this.config = {
|
this.config = {
|
||||||
general: {
|
general: {
|
||||||
name: uiConfig.name,
|
|
||||||
id: node.id, // node.id is for the child registration process
|
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)
|
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: {
|
logging: {
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ maintenanceAlert: this.state.checkMaintenanceStatus()
|
|||||||
//load local dependencies
|
//load local dependencies
|
||||||
const EventEmitter = require('events');
|
const EventEmitter = require('events');
|
||||||
const {loadCurve,logger,configUtils,configManager,state, nrmse, MeasurementContainer, predict, interpolation , childRegistrationUtils} = require('generalFunctions');
|
const {loadCurve,logger,configUtils,configManager,state, nrmse, MeasurementContainer, predict, interpolation , childRegistrationUtils} = require('generalFunctions');
|
||||||
|
const { name } = require('../../generalFunctions/src/convert/lodash/lodash._shimkeys');
|
||||||
|
|
||||||
class Machine {
|
class Machine {
|
||||||
|
|
||||||
@@ -65,6 +66,9 @@ class Machine {
|
|||||||
|
|
||||||
//Init config and check if it is valid
|
//Init config and check if it is valid
|
||||||
this.config = this.configUtils.initConfig(machineConfig);
|
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) {
|
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.`);
|
this.logger.warn(`${!this.model ? 'Model not specified' : 'Curve not found for model ' + this.model} in machineConfig. Cannot make predictions.`);
|
||||||
|
|||||||
Reference in New Issue
Block a user