dev-Rene #5

Merged
renederen merged 3 commits from dev-Rene into main 2025-10-06 14:09:06 +00:00
2 changed files with 3 additions and 9 deletions
Showing only changes of commit 5a0c46cb67 - Show all commits

View File

@@ -86,7 +86,7 @@ class nodeClass {
}
};
console.log(`position vs child for ${this.name} is ${this.config.functionality.positionVsParent}`);
console.log(`position vs child for ${this.name} is ${this.config.functionality.positionVsParent} the distance is ${this.config.functionality.distance}`);
// Utility for formatting outputs
this._output = new outputUtils();
@@ -120,7 +120,7 @@ class nodeClass {
this.node.send([
null,
null,
{ topic: 'registerChild', payload: this.node.id , positionVsParent: this.config?.functionality?.positionVsParent || 'atEquipment' },
{ topic: 'registerChild', payload: this.node.id , positionVsParent: this.config?.functionality?.positionVsParent || 'atEquipment' , distance: this.config?.functionality?.distance || null},
]);
}, 100);
}

View File

@@ -521,14 +521,8 @@ class Measurement {
this.emitter.emit('mAbs', this.outputAbs);// DEPRECATED: Use measurements container instead
// In the new method just update the measurement container and let the parent subscribe to it
if (typeof this.config.functionality.distance !== 'undefined') {
this.logger.debug(`Updating type: ${this.config.asset.type}, variant: ${"measured"}, postition : ${this.config.functionality.distance} container with new value: ${this.outputAbs}`);
this.measurements.type(this.config.asset.type).variant("measured").position(this.config.functionality.distance).value(this.outputAbs, Date.now(),this.config.asset.unit );
return;
}
this.logger.debug(`Updating type: ${this.config.asset.type}, variant: ${"measured"}, postition : ${this.config.functionality.positionVsParent} container with new value: ${this.outputAbs}`);
this.measurements.type(this.config.asset.type).variant("measured").position(this.config.functionality.positionVsParent).value(this.outputAbs, Date.now(),this.config.asset.unit );
this.measurements.type(this.config.asset.type).variant("measured").position(this.config.functionality.positionVsParent).distance(this.config.functionality.distance).value(this.outputAbs, Date.now(),this.config.asset.unit );
}
}