After dece5d268f, running the thermal
model itself switches the printer to "active", preventing a calibration
run from the LCD to start.
Explicitly allow LcdCommands::ThermalModel in this case.
!variable.running() || variable.expired()
is equal to
variable.expired_cont()
The latter required less flash memory
Change in memory:
Flash: -28 bytes
SRAM: 0 bytes
Model UV as power-invariant, so that scaling P doesn't change the
intercept location (that is, the zero point remains at the same
temperature even for more powerful heaters).
NOTE: It's not clear to me whether this is generally true (couldn't
find a datasheet from the same heater in diffent power variants
showing the efficiency loss)
- 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.
Main changes:
* setAllTargetHotends() is removed
* setTargetHotendSafe() is removed
* Extruder parameter on setTargetHotend() is dropped
Change in memory:
Flash: -192 bytes
SRAM: 0 bytes
Running `M310 A` should set the TM calibration bit status if the
autotune procedure was successful.
Partially addresses #3891 and #3890, since running `M310 A F0` should
*still* count as valid calibration data and is not something that can be
replicated by using the LCD (which enforces self-test).
Disabling the model during a warn/error condition will also stop
updating the warning/error flag, keeping the printer in an error state.
Clear all flags as well when changing model settings.
Set a menu block for fatal thermal errors instead of abusing
lcd_return_to_status() to kick the user out of the menus.
This now allows a thermal model error to be recoverable through menu
access.
Ensure that fan checks are reset and use the new speed at each step of
the calibration.
This also gives extra time to the fan to ramp-up from a cold start,
when a fancheck could previously start right *after* the speed change.
Should fix#3791
- Ensures repeated autotune attempts with self-check can't succeed due
to different starting conditions.
- Allows for a simpler workflow during selftest and wizard if autotune
fails.
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.