thermostat: rst pid_state at pwr_up
This commit is contained in:
parent
8f38acd0f2
commit
3410a271fd
|
@ -213,12 +213,14 @@ impl Thermostat {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn power_up(&mut self) {
|
pub fn power_up(&mut self) {
|
||||||
self.max1968.power_up();
|
if !self.max1968.is_powered_on() {
|
||||||
|
self.max1968.power_up();
|
||||||
|
self.pid_ctrl_ch0.reset_pid_state();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn power_down(&mut self) {
|
pub fn power_down(&mut self) {
|
||||||
self.max1968.power_down();
|
self.max1968.power_down();
|
||||||
self.pid_ctrl_ch0.reset_pid_state();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_center_pt(&mut self, value: ElectricPotential) {
|
fn set_center_pt(&mut self, value: ElectricPotential) {
|
||||||
|
|
Loading…
Reference in New Issue