This fixes the spurious feedback when rotating the knob
because lcd_update is called much often than the interval
at which the lcd rendering is updated
Change in memory
Flash: -88 bytes
SRAM: -9 bytes
This commit adds the ability for firmware to make sounds when the
knob is clicked or rotated, when LCD updates are disabled.
The improvement here is the sound is being made with one line of code
whether or not LCD updates are enabled or disabled.
Change in memory:
Flash: -24 bytes
SRAM: 0 bytes
This commit adds the ability for the firmware to dim and wake the
backlight when LCD updates are disabled. Such as in the MMU error screen
or when rendering full screen messages which typically
disable the LCD updates to prevent the status screen from rendering.
Fixes#2777
Change in memory:
Flash: -26 bytes
SRAM: +1 byte
Used lcd_print_pad_P is some obvious places. We can probably use
this function in more places to further save flash memory
Change in memory:
Flash: -268 bytes
SRAM: 0 bytes
We can use lcd_print_pad to determine
whether the end of the file name was reached
lcd_print_pad now returns the last character pointed to.
If the end of the string was reached, it will be the null delimeter which
evaluates to "false" in an if statment (same as NULL).
Else "true" means the end of the string was not reached.
Change in memory:
Flash: -42 bytes
SRAM: 0 bytes
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.
Saves 8 bytes of Flash memory
This call is redundant and when moving between menus
it gets called multiple times which results in waste
of clock cycles.
lcd_timeoutToStatus.start() is called from menu_lcd_lcdupdate_func()
which is enough.
The longpress function is currently called within the temperature ISR,
which is bogus. Calling the longpress function at the wrong moment
can corrupt the menu buffers.
Move the call to the main loop by changing the logic slightly:
- still sample the lcd buttons inside the temperature ISR, which keeps
scrollong/pressing responsive, but...
- set a flag to indicate that longpress has been triggered instead of
calling the function directly
- call the function on the next manage_inactivity run
Combined with #3180 this removes _most_ unsafe operations out of the ISR
which can happen during a normal run (max/mintemp warnings are still an
exception).
Timing functions (millis, micros and delay) replaced in whole source, defined in Marlin.h.
This commit enables original implementation (SYSTEM_TIMER_2 undefined)
Verified with passed complete wizard process.