Marlin
Marlin copied to clipboard
✨♻️ Big progress display revision
Description
Basically this is unification of print progress that makes it hardware-agnostic and all-granular, overall way more convenient to work with. All options are as independent as they can be, which allows for easy UI customisation.
Benefits
M73 doesn't depend on display existence anymore.
M73_REPORT Prusa-like M73 that report values back. This allow hosts to get M73 progress from SD printing for somewhat accurate time estimates. Octoprint plugin: https://github.com/arekm/octopi_eta_override
USE_M73_INTERACTION_TIME, SHOW_INTERACTION_TIME Adds "time to user interaction". Prusa use it for filament change, but it can be anything, i.e. "pause at layer" - this will require some additional support from slicers.
PRINT_PROGRESS_SHOW_DECIMALS now affect every UI progress display uniformly, and M73 too.
ROTATE_PROGRESS_DISPLAY is gone as it lost all meaning. However much progress string displays you enable can be rotated in any native UI, or no rotation if you leave only one. New function iterates over pointer array on blink, so each blink next string is redrawn. This also allow for completely arbitrary string placement on screen: all rotated in one place, all separate, in any groups... only thing to care about is to not leave artifacts from previous string/value. Same approach can be used for rotation of any screen element at all, i.e. multiple hotend temps on 1602 LCD, possibly even all in one array to save resources on problematic configurations, like AVR running delta kinematic.
Bugfixes and small stuff
Added long overdue fs.img to gitignore.
permyriadtostr4 now always 4-width.
Fixed progress bar drawing in LIGHTWEIGHT_UI ( thanks Scawty - "The code is relying on int being 16-bit so that the arithmetic right shift fills the left side with ones. On an ESP32 (and arm) it's 32-bit and not being sign extended" )
LIGHTWEIGHT_UI now redraw progress bar even less often which should be saving even more cycles.
Things to do
Possibly need to expand capabilities report.
Some options to beep/flash lights when interaction time approach zero.
HD44780 strings need rewrite similar to LIGHTWEIGHT_UI to avoid artifacts when timer goes down from hundreds of hours.
permyriadtostr4 need further touchups: whole single digit values don't show decimal, doesn't look nice.
Related Issues
Draft with some notes: https://github.com/MarlinFirmware/Marlin/pull/24714