GUI: add a spinbox to pre-dial the simulated Pot's reset temperature

btn_pot_reset always reset the simulated Pot to the ambient
temperature. Add doubleSpinBox_pot_temp next to it (shown/hidden
together, same as the button) so the user can dial in a different
starting temperature before committing it - it seeds from the same
remembered ambient value on startup but is otherwise independent and
not persisted.

tasks/pot.py's PotTask.recv() now resets the plant to whatever
temperature the 'Reset' message carries, falling back to ambient for
the bare True a caller might still send.
This commit is contained in:
2026-06-23 19:34:33 +02:00
parent e4f8b15ab0
commit f035e1decd
4 changed files with 74 additions and 2 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ class PotTask(ATask):
async def recv(self, data):
for pair in data.items():
if 'Reset' in pair[0]:
self.plant.initial(self.plant.theta_amb)
# The GUI's pot-temp spinbox sends the temperature to reset
# to directly - fall back to ambient for any older/other
# caller that still just sends a bare True.
value = pair[1]
temp = value if isinstance(value, (int, float)) else self.plant.theta_amb
self.plant.initial(temp)
async def send(self, data):
await self.msg_handler.send(data)