mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 18:54:28 +05:00
fix: hysteresis with native heating control has been fixed
This commit is contained in:
@@ -667,26 +667,25 @@ protected:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hysteresis
|
||||||
|
// Only if enabled PID or/and Equitherm or Native heating control via OT
|
||||||
|
bool useHyst = false;
|
||||||
|
if (settings.heating.hysteresis > 0.01f && vars.sensors.indoor.connected) {
|
||||||
|
useHyst = settings.equitherm.enable || settings.pid.enable || settings.opentherm.nativeHeatingControl;
|
||||||
|
}
|
||||||
|
|
||||||
// Hysteresis
|
if (useHyst) {
|
||||||
// Only if enabled PID or/and Equitherm or Native heating control via OT
|
if (!this->heatingBlocking && vars.temperatures.indoor - settings.heating.target + 0.0001f >= settings.heating.hysteresis) {
|
||||||
bool useHyst = false;
|
this->heatingBlocking = true;
|
||||||
if (settings.heating.hysteresis > 0.01f && vars.sensors.indoor.connected) {
|
|
||||||
useHyst = settings.equitherm.enable || settings.pid.enable || settings.opentherm.nativeHeatingControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useHyst) {
|
} else if (this->heatingBlocking && vars.temperatures.indoor - settings.heating.target - 0.0001f <= -(settings.heating.hysteresis)) {
|
||||||
if (!this->heatingBlocking && vars.temperatures.indoor - settings.heating.target + 0.0001f >= settings.heating.hysteresis) {
|
|
||||||
this->heatingBlocking = true;
|
|
||||||
|
|
||||||
} else if (this->heatingBlocking && vars.temperatures.indoor - settings.heating.target - 0.0001f <= -(settings.heating.hysteresis)) {
|
|
||||||
this->heatingBlocking = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (this->heatingBlocking) {
|
|
||||||
this->heatingBlocking = false;
|
this->heatingBlocking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (this->heatingBlocking) {
|
||||||
|
this->heatingBlocking = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user