So in an ideal scenario, the newest file is first. This of course breaks as soon as a file is deleted/renamed/moved, but it should at least be fixed now compared to before where the direction could be influenced by a disabled setting
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.
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
During first layer calibration we have the live Z baby step menu
on the LCD and the user can tune their Z offset live.
Once the first layer calibration is done, we want to exit the menu
immediately. For this purpose it is much more efficient to
call lcd_return_to_status(). There is no visual difference
on the LCD for the user.
Change in memory footprint:
Flash: -34 bytes
SRAM: -1 byte
The current unload sequence does not give good results.
The Marlin 2 sequence looks good on my end. This can be later
used to improve M600
Added all the constants from Marlin 2
It is only used when the MMU is disabled. With the MMU we use a defined ramming sequence.
When the MMU is disabled I borrowed the usages from Marlin 2.
The L parameter only defines the length for the "fast" load length.
Default value is 70mm, same as M600