Add a GUI text entry to set the ambient temperature live

New lineEdit_ambient next to the host/connect row - type a value and
press Enter to send {"System": {"AmbientTemp": ...}}. The server now
has a recv handler for the System channel (previously send-only):
updates the real Pot's ambient temperature and, where the controller
has an internal model (Smith), its model Pots too (new
set_ambient_temperature() on TempControllerSmith), then echoes the new
value back so the status bar label and entry itself stay in sync.
This commit is contained in:
2026-06-21 11:53:45 +02:00
parent a44060a9bd
commit 40cf4b69cc
5 changed files with 71 additions and 2 deletions
+4
View File
@@ -28,6 +28,10 @@ class TempController(TempControllerBase):
self.model.set_thermal_params(M, C)
self.model_delay.set_thermal_params(M, C)
def set_ambient_temperature(self, theta_amb):
self.model.set_ambient_temperature(theta_amb)
self.model_delay.set_ambient_temperature(theta_amb)
def on_state_entered(self, state):
if state == States.HEAT:
self.model.initial(self.theta_ist)