Make FSM hysteresis thresholds configurable
THRESH_HOLD_IDLE/HOLD_HEAT/IDLE_HEAT/IDLE_HOLD/HEAT_HOLD/HEAT_IDLE in tc_constants.py were hardcoded module-level constants shared by every controller instance, so tuning the IDLE/HOLD/HEAT hysteresis required a code change. Replace them with DEFAULT_THRESHOLDS plus an optional TempCtrl.Thresholds config section, merged at construction time in TempControllerBase.__init__ so configs that omit the section keep behaving exactly as before. Documented the new section in config.json.templ; left config.json.sim without it to exercise the default-fallback path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,14 @@
|
||||
"ki": 0.01,
|
||||
"kd": 0.0,
|
||||
"kt": 1.5
|
||||
},
|
||||
"Thresholds": {
|
||||
"HoldIdle": 0.1,
|
||||
"HoldHeat": 1.0,
|
||||
"IdleHeat": 1.0,
|
||||
"IdleHold": 0.1,
|
||||
"HeatHold": 1.0,
|
||||
"HeatIdle": 1.0
|
||||
}
|
||||
},
|
||||
"Model": {
|
||||
|
||||
Reference in New Issue
Block a user