From e8fa90e75367102e6ed312ad3b6649e0f711dd27 Mon Sep 17 00:00:00 2001 From: jens Date: Tue, 12 Oct 2021 17:13:19 +0200 Subject: [PATCH] - PID/TC goes Idle state on first theat_ist measurement --- components/pid/temp_controller.py | 3 ++- components/pid/temp_controller_smith.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/pid/temp_controller.py b/components/pid/temp_controller.py index f99afb8..0b34212 100644 --- a/components/pid/temp_controller.py +++ b/components/pid/temp_controller.py @@ -87,7 +87,8 @@ class TempController(APid): # Process state state_next = self.state if self.state == States.INIT: - state_next = States.IDLE + if not self.is_startup: + state_next = States.IDLE elif self.state == States.IDLE: if diff >= THRESH_IDLE_HEAT: state_next = States.HEAT diff --git a/components/pid/temp_controller_smith.py b/components/pid/temp_controller_smith.py index 954dbee..40547ee 100755 --- a/components/pid/temp_controller_smith.py +++ b/components/pid/temp_controller_smith.py @@ -112,7 +112,8 @@ class TempController(APid): # Process state state_next = self.state if self.state == States.INIT: - state_next = States.IDLE + if not self.is_startup: + state_next = States.IDLE elif self.state == States.IDLE: if diff >= THRESH_IDLE_HEAT: state_next = States.HEAT