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:
@@ -220,14 +220,6 @@ class SudTask(ATask):
|
||||
if value in (SudState.DONE, SudState.IDLE):
|
||||
self.stirrer.set_duty_cycle(1.0)
|
||||
self.stirrer.set_speed(0)
|
||||
# A finished/stopped run no longer owns the controller - hand
|
||||
# control back to manual mode (off by default there too).
|
||||
self.tc.set_enabled(False)
|
||||
else:
|
||||
# Any other state (RAMPING/HOLDING/WAIT_USER/PAUSED) means a
|
||||
# run is in progress and needs the controller actively driving
|
||||
# the heater.
|
||||
self.tc.set_enabled(True)
|
||||
|
||||
def on_user_message_changed(self, value):
|
||||
asyncio.create_task(self.send({'UserMessage': value}))
|
||||
|
||||
Reference in New Issue
Block a user