minor variable name changes
This commit is contained in:
@@ -121,8 +121,8 @@ class Reactor {
|
|||||||
this._connectReactor(child);
|
this._connectReactor(child);
|
||||||
break;
|
break;
|
||||||
case "machine":
|
case "machine":
|
||||||
this.logger.debug(`Registering rotating machine child...`);
|
this.logger.debug(`Registering machine child...`);
|
||||||
this._connectRotatingMachine(child);
|
this._connectMachine(child);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -174,21 +174,21 @@ class Reactor {
|
|||||||
this.upstreamReactor = reactorChild;
|
this.upstreamReactor = reactorChild;
|
||||||
reactorChild.downstreamReactor = this;
|
reactorChild.downstreamReactor = this;
|
||||||
|
|
||||||
reactorChild.emitter.on("stateChange", (data) => {
|
reactorChild.emitter.on("stateChange", (eventData) => {
|
||||||
this.logger.debug(`State change of upstream reactor detected.`);
|
this.logger.debug(`State change of upstream reactor detected.`);
|
||||||
this.updateState(data);
|
this.updateState(eventData);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_connectRotatingMachine(rotatingMachineChild) {
|
_connectMachine(machineChild) {
|
||||||
if (!rotatingMachineChild) {
|
if (!machineChild) {
|
||||||
this.logger.error("Invalid rotating machine provided.");
|
this.logger.error("Invalid rotating machine provided.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rotatingMachineChild.config.functionality.positionVsParent == "downstream") {
|
if (machineChild.config.functionality.positionVsParent == "downstream") {
|
||||||
rotatingMachineChild.upstreamReactor = this;
|
machineChild.upstreamReactor = this;
|
||||||
this.returnPump = rotatingMachineChild;
|
this.returnPump = machineChild;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user