- Expose TEMP_MODEL_fS and TEMP_MODEL_LAG as D and L respectively,
initializing the default values based on the previous hard-coded
values.
- Always round L to the effective sample lag to future-proof model
upgrades or changes (the stored value _is_ the effective value).
- Introduce UV as a new linear term for PTC heaters, defaulting
to an identity for model backward-compatibility.
Provide average calibrated values for all fan levels for MK3/MK3S
variants and enable the model by default.
This ensures the calibration step is not skipped unless explicitly
disabled.
Force-clear fan values during autotune to restore the previous
calibration behavior, as fan resistance levels can be too big and
prevent the autotune-with-selfcheck to fail.
Calibrate C/R values via univariate minimization using golden section.
This is done in several passes:
- Bootstrap C by setting an initial high R value
- Calibrate R at the requested working temperature
- Cooldown
- Refine C to the final value
- Estimate R losses for a subset of fan speeds
- Interpolate remaining values to speed-up the process
This results in robust values which are tailored to the current
filtering constants, and avoid having to sample for an extended
time to reach the required resolution.
The refining pass could avoid cooldown if the recording buffer was at
least twice as large, so that we could record both the heating and the
steady-state, saving _considerable_ time.
This currently bypasses the ConfigurationStore, which doesn't fit the
malin model nicely.
temp_model is using it's own private copy directly.
But maybe we should change this in the future.
- Allow all parameters to be changed at runtime through M310
- Move the model prototypes into a separate temp_model.h header
- Allow the checked to be enabled/disabled at runtime
- Introduce a warning threshold