Lots of minor bug fixes to update on architecture choices
This commit is contained in:
@@ -67,8 +67,8 @@ class nodeClass {
|
||||
const totalFlow = mg.measurements
|
||||
?.type("flow")
|
||||
?.variant("predicted")
|
||||
?.position("downstream")
|
||||
?.getCurrentValue() || 0;
|
||||
?.position("atequipment")
|
||||
?.getCurrentValue('m3/h') || 0;
|
||||
|
||||
const totalPower = mg.measurements
|
||||
?.type("power")
|
||||
@@ -199,16 +199,16 @@ class nodeClass {
|
||||
const RED = this.RED;
|
||||
switch (msg.topic) {
|
||||
case "registerChild":
|
||||
console.log(`Registering child in mgc: ${msg.payload}`);
|
||||
//console.log(`Registering child in mgc: ${msg.payload}`);
|
||||
const childId = msg.payload;
|
||||
const childObj = RED.nodes.getNode(childId);
|
||||
|
||||
// Debug: Check what we're getting
|
||||
console.log(`Child object:`, childObj ? 'found' : 'NOT FOUND');
|
||||
console.log(`Child source:`, childObj?.source ? 'exists' : 'MISSING');
|
||||
//console.log(`Child object:`, childObj ? 'found' : 'NOT FOUND');
|
||||
//console.log(`Child source:`, childObj?.source ? 'exists' : 'MISSING');
|
||||
if (childObj?.source) {
|
||||
console.log(`Child source type:`, childObj.source.constructor.name);
|
||||
console.log(`Child has state:`, !!childObj.source.state);
|
||||
//console.log(`Child source type:`, childObj.source.constructor.name);
|
||||
//console.log(`Child has state:`, !!childObj.source.state);
|
||||
}
|
||||
|
||||
mg.childRegistrationUtils.registerChild(
|
||||
@@ -217,7 +217,7 @@ class nodeClass {
|
||||
);
|
||||
|
||||
// Debug: Check machines after registration
|
||||
console.log(`Total machines after registration:`, Object.keys(mg.machines || {}).length);
|
||||
//console.log(`Total machines after registration:`, Object.keys(mg.machines || {}).length);
|
||||
break;
|
||||
|
||||
case "setMode":
|
||||
|
||||
Reference in New Issue
Block a user