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
-12
View File
@@ -61,17 +61,6 @@ class SudTask(ATask):
ramping = self.sud.state == SudState.RAMPING
phase = ramp if ramping and ramp is not None else hold
# A ramp step whose target is below the current temperature can
# only be reached by passive cooling - force the heater off for
# its whole duration (decided once, here, rather than re-checked
# every tick) instead of relying on the controller's own FSM to
# notice and idle out.
# bool(...): get_theta_ist() can be a numpy.float64 (Pot's transport
# delay line is a numpy array internally) - the '<' comparison would
# then yield numpy.bool_, which json.dumps() can't serialize.
cooling = bool(ramping and ramp is not None and step['temperature'] < self.tc.get_theta_ist() - TEMP_REACHED_TOLERANCE)
self.tc.set_cooling(cooling)
if step is not None:
self.apply_plant_params(step)
if ramping and ramp is not None:
@@ -87,7 +76,6 @@ class SudTask(ATask):
'Rate': ramp.get('rate') if ramp else None,
'Duration': hold.get('duration') if (hold is not None and not ramping) else None,
'WaitForUser': step.get('user_wait_for_continue', False) if step else None,
'Cooling': cooling,
}}))
def on_state_changed(self, value):