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