heaters: Don't raise an error if PID Ki is set to zero

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-10-17 20:48:25 -04:00
parent abb0d8801c
commit f8cb1e30eb
1 changed files with 3 additions and 1 deletions

View File

@ -182,7 +182,9 @@ class ControlPID:
self.min_deriv_time = heater.get_smooth_time()
imax = config.getfloat('pid_integral_max', self.heater_max_power,
minval=0.)
self.temp_integ_max = imax / self.Ki
self.temp_integ_max = 0.
if self.Ki:
self.temp_integ_max = imax / self.Ki
self.prev_temp = AMBIENT_TEMP
self.prev_temp_time = 0.
self.prev_temp_deriv = 0.