Remove the ad-hoc cooling override now that COOL handles it natively

TempControllerBase.cooling/set_cooling() forced y=0 in advance of a
Sud ramp-down step; redundant now that the FSM's own COOL state
detects and handles a negative diff itself. Removed from the
controller, SudTask's anticipatory detection (and the Step message's
now-unused "Cooling" field), and demo_sud.py's mirror of it.

gui: the "Cool down" status-bar indicator now reflects the
controller's actual State ("States.COOL") via the TempCtrl channel,
rather than Sud's removed anticipatory flag - renamed
sud_cooling/set_sud_cooling to tc_cooling/set_tc_cooling to match.
This commit is contained in:
2026-06-21 13:48:23 +02:00
parent 858249f1e7
commit 929b8758c4
4 changed files with 11 additions and 41 deletions
+1 -12
View File
@@ -45,14 +45,6 @@ class TempControllerBase(APid):
self.pid_rate.set_params(params['Heat'])
self.pid_cool.set_params(params['Cool'])
self.is_startup = True
# Explicit override for a ramp step whose target is below the
# current temperature: forces y to 0 immediately rather than
# waiting for the FSM's own (slower, hysteresis-based) COOL
# transition, as soon as the caller (SudTask) knows the step needs
# to passively cool down. Mostly superseded by the COOL state
# below for a heat-only actuator (both end up clamped to 0
# power) - kept for the immediate, decided-in-advance response.
self.cooling = False
# Master on/off switch: while disabled, the FSM is held in IDLE and
# the controller tries not to drive the heater at all (output
# forced to 0) - off by default, enabled either by the user
@@ -91,9 +83,6 @@ class TempControllerBase(APid):
def set_heatrate_soll(self, value):
self.heatrate_soll_set = value
def set_cooling(self, value):
self.cooling = value
def set_enabled(self, value):
self.enabled = value
@@ -150,7 +139,7 @@ class TempControllerBase(APid):
self.pid_rate.process(heatrate_err, -self.heatrate_ist)
self.pid_cool.process(heatrate_err, -self.heatrate_ist)
if self.state == States.IDLE or self.cooling:
if self.state == States.IDLE:
self.y = 0
elif self.state == States.COOL:
self.y = self.pid_cool.get_y()