fixed change mode and control logic method
This commit is contained in:
@@ -212,6 +212,19 @@ class PumpingStation {
|
||||
);
|
||||
}
|
||||
|
||||
changeMode(newMode){
|
||||
if ( this.config.control.allowedModes.has(newMode) ){
|
||||
const currentMode = this.mode;
|
||||
this.logger.info(`Control mode changing from ${currentMode} to ${newMode}`);
|
||||
this.mode = newMode;
|
||||
}
|
||||
else{
|
||||
this.logger.warn(`Attempted to change to unsupported control mode: ${newMode}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
_controlLogic(direction) {
|
||||
switch (this.mode) {
|
||||
case 'levelbased':
|
||||
|
||||
Reference in New Issue
Block a user