TempControllerBase: require PID gains via set_params(), not the constructor

Mirrors components/pid/pid.py's own Pid.set_params() pattern: params/
thresholds start out None, and set_params() configures pid_hold/pid_heat/
pid_cool from them. process()/process_fsm() fail naturally (TypeError on
None) if called before set_params() - same as Pid.process() already does -
rather than a new bespoke check. Updates all callers (server/brewpi.py,
SudForecastEstimator, and the pid/sud demo scripts) to call set_params()
right after construction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DkkuG48uHFCGKe6dPSERFk
This commit is contained in:
2026-06-22 18:21:20 +02:00
co-authored by Claude Sonnet 4.6
parent 296d3a333d
commit 0a6d3e6462
8 changed files with 27 additions and 15 deletions
+2 -1
View File
@@ -48,7 +48,8 @@ if __name__ == '__main__':
"Td" : 60
}
ctrl = TempController(dt, ctrl_params, plant_params, theta_amb)
ctrl = TempController(dt, plant_params, theta_amb)
ctrl.set_params(ctrl_params)
plant = Pot(dt)
plant.set_plant_params(plant_params)
plant.set_ambient_temperature(theta_amb)