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:
@@ -3,8 +3,8 @@ from components.pid.temp_controller_base import TempControllerBase, States
|
||||
|
||||
|
||||
class TempController(TempControllerBase):
|
||||
def __init__(self, dt, params, model_params, theta_amb=20):
|
||||
TempControllerBase.__init__(self, dt, params)
|
||||
def __init__(self, dt, model_params, theta_amb=20):
|
||||
TempControllerBase.__init__(self, dt)
|
||||
self.dt = dt
|
||||
self.last_theta_ist = 20
|
||||
self.heatrate_ist = 0
|
||||
|
||||
Reference in New Issue
Block a user