heater: Introduce smooth_time config option; remove pid_deriv_time

Add generic temperature smoothing to the Heater class.  This is useful
to avoid min_extrude_temp and verify_heater errors due to measurement
noise.

Rename the pid_deriv_time config option to smooth_time so that the
smoothing amount need only be specified once.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-07-06 13:27:05 -04:00
parent 32175bc66a
commit b0ee323e2e
3 changed files with 36 additions and 25 deletions

View file

@ -86,7 +86,7 @@ class ControlAutoTune:
if temp > self.peak:
self.peak = temp
self.peak_time = read_time
def check_busy(self, eventtime, last_temp, target_temp):
def check_busy(self, eventtime, smoothed_temp, target_temp):
if self.heating or len(self.peaks) < 12:
return True
return False