Add Closed-loop/Open-loop heater control mode

Closed-loop (default, checkbox checked): TC has exclusive control over
the heater; temp-soll and heatrate-soll sliders are active; direct
heater power entry is disabled. TC now stays enabled at server startup
and whenever closed-loop mode is active — SudTask no longer disables it
on IDLE/DONE, so adjusting temp-soll manually with no sud running
immediately drives the heater via the TC.

Open-loop (checkbox unchecked, only selectable when paused/stopped):
TC is disconnected from the heater; only the heater-power slider is
active. Switching back to closed-loop resets power_soll to 0 and
re-enables the TC.

On play, the mode is automatically reset to closed-loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SH2D4LRuCnhLSzoYerAfJX
This commit is contained in:
2026-06-28 10:29:30 +02:00
co-authored by Claude Sonnet 4.6
parent 956f32e6ea
commit f55d085ae4
6 changed files with 53 additions and 16 deletions
+2
View File
@@ -143,6 +143,8 @@ if __name__ == '__main__':
# Assign data flow
# Assign tc control value to heater
tc.set_on_changed("y", heater_task.actor)
# HeaterTask owns TC enable: enabled in closed-loop mode, disabled in open-loop.
heater_task.set_on_closed_loop_changed(tc.set_enabled)
# Assign temp. sensor readings to tc
sensor_task.set_on_changed("temp", ChangedFloat(tc.set_theta_ist, prec=2).set)