forked from M-Labs/kirdy
thermostat: Limit Pid Temp SetPt to TempMon limits
This commit is contained in:
parent
a8787430b1
commit
6ee45b4814
@ -345,6 +345,8 @@ impl Thermostat{
|
||||
}
|
||||
|
||||
pub fn set_temperature_setpoint(&mut self, t: ThermodynamicTemperature) {
|
||||
let temp_mon_settings = self.temp_mon.get_settings();
|
||||
let t = t.min(temp_mon_settings.upper_limit).max(temp_mon_settings.lower_limit);
|
||||
self.pid_ctrl_ch0.set_pid_setpoint(t);
|
||||
self.temp_mon.set_setpoint(t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user