- Generalize force_selftest_if_fw_version() so we can check when upgrading
between arbitrary FW versions.
- Do not call update_current_firmware_version_to_eeprom() prematurely
when forcing self-test (if a reset happens before self-test completes,
the check would be incorrectly skipped on the next run).
If there is no running print, and the printer is Stopped, add a new
"Acknowledge error" menu entry to unlock the printer.
This simply calls lcd_print_stop(), which is identical in behavior to a
thermal error with a running print.
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.
We allow resuming from the LCD via start print and resume print,
it makes sense to clear the error on stop too.
For this reason distinguish whether the action is performed
automatically or manually (ie: interactively).
The error is only cleared when the command is run interactively.
Since M310 cannot change the heaters, allowing M310 S0 (and changing
parameters) allows to recover a usb-controlled printer which has been
locked-out due to bad model settings.
This prevents the ability to run gcode from the SD card.
In a thermal error with faulty values, and without serial access, this
is the only way to process an M310 instruction and recover.
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
- Correctly sequence the enqueued commands in order to check for the
real calibration result.
- Perform autocalibration with self-check enabled.
- Only save/continue the wizard if autocalibration succeeds.
- 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.
Fixes#3715
When a long-press is triggered, the LCD inactivity timer
needs to be restarted. This is done with lcd_timeoutToStatus.start()
This also fixes situations where a long-press is triggered, and the timer
times out immediately (because it was not reset properly)
Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
Consume any pending LCD click after the temperature model calibration.
Since we're already in the status menu, the usual consume action is not
done automatically here.
The current code forces any warning to return the user to the status
screen in order to show the message.
Thermal anomaly warnings can repeat at very short intervals, making menu
navigation (to pause/tune the print) impossible.
We now check if the message to be displayed is the same and only force a
kickback for new messages.
This partially reverts https://github.com/prusa3d/Prusa-Firmware/pull/3600
since we need the string to be null terminated for ease of comparison.
We pad the status line at display time instead using the new
lcd_print_pad() function which achieves the same effect.
In ultralcd_init() do not use lcd_setstatuspgm() to initialize the
welcome message.
The internal call to lcd_finishstatus() requires the serial to be
already available. Split the function into lcd_padstatus() to pre-pad
the string and save some space.
Fix regression introduced in fc10ca3146.
Accept incoming serial commands without line numbers (assumed to be
injected by the host), but do not reset the last line count when doing
so.
Now that lcd_status_message is now initialised correctly at boot-up,
this for-loop is no longer required. Now lcd_status_message is
only set in lcd_updatestatus() which always calls lcd_finishstatus()
lcd_finishstatus() makes sure the message does not exceed 20 characters
Saves 34 bytes of flash
static variables are automatically zero initialised. Now that the
status line message is initialised in ultralcd_init(), we don't
need to set the variable in global scope.
Saves 22 bytes of flash and 1 byte of SRAM