diff --git a/pytec/autotune.py b/pytec/autotune.py index de51347..b8b8b3d 100644 --- a/pytec/autotune.py +++ b/pytec/autotune.py @@ -56,19 +56,6 @@ class PIDAutotune: self._Ku = 0 self._Pu = 0 - def init_tuner(self, timestamp): - self._peak_type = 0 - self._peak_count = 0 - self._output = 0 - self._initial_output = 0 - self._Ku = 0 - self._Pu = 0 - self._inputs.clear() - self._peaks.clear() - self._peak_timestamps.clear() - self._peak_timestamps.append(timestamp) - self._state = PIDAutotuneState.STATE_RELAY_STEP_UP - def state(self): """Get the current state.""" return self._state @@ -109,7 +96,7 @@ class PIDAutotune: if (self._state == PIDAutotuneState.STATE_OFF or self._state == PIDAutotuneState.STATE_SUCCEEDED or self._state == PIDAutotuneState.STATE_FAILED): - self.init_tuner(now) + self._state = PIDAutotuneState.STATE_RELAY_STEP_UP self._last_run_timestamp = now