forked from p.vanderwilt/settler
Add register child function and fix whitespace
This commit is contained in:
@@ -47,11 +47,11 @@
|
|||||||
window.EVOLV.nodes.rotatingMachine.positionMenu.saveEditor(this);
|
window.EVOLV.nodes.rotatingMachine.positionMenu.saveEditor(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
let TS_set = parseFloat($("#node-input-TS_set").typedInput("value"));
|
const TS_set = parseFloat($("#node-input-TS_set").typedInput("value"));
|
||||||
if (isNaN(TS_set) || TS_set < 0) {
|
if (isNaN(TS_set) || TS_set < 0) {
|
||||||
RED.notify("TS is not set correctly", {type: "error"});
|
RED.notify("TS is not set correctly", {type: "error"});
|
||||||
}
|
}
|
||||||
let inlet = parseInt($("#node-input-n_inlets").typedInput("value"));
|
const inlet = parseInt($("#node-input-n_inlets").typedInput("value"));
|
||||||
if (inlet < 1) {
|
if (inlet < 1) {
|
||||||
RED.notify("Number of inlets not set correctly", {type: "error"});
|
RED.notify("Number of inlets not set correctly", {type: "error"});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,14 @@ class Settler {
|
|||||||
this.measurements = new MeasurementContainer();
|
this.measurements = new MeasurementContainer();
|
||||||
this.childRegistrationUtils = new childRegistrationUtils(this); // Child registration utility
|
this.childRegistrationUtils = new childRegistrationUtils(this); // Child registration utility
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registerChild(child, softwareType) {
|
||||||
|
switch (softwareType) {
|
||||||
|
|
||||||
|
default:
|
||||||
|
this.logger.error(`Unrecognized softwareType: ${softwareType}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { Settler };
|
module.exports = { Settler };
|
||||||
Reference in New Issue
Block a user