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
Update fw-build.sh
- Output used space of each translation (easier to troubleshoot)
- Read config.h max size per translation
- output variant .map files (easier to troubleshoot and finding missing/unused messages)
This message is never actually shown on the LCD (it's immediately
overwritten by other content). It also include g-code in a translatable
string, which is not a good idea. It's also otherwise identical to
MSG_V2_CALIBRATION, which we should have used.
Just remove it and save some space in the process.
Having the original PRINTER_ACTIVE macro copied at multiple spots doesn't make sense.
Refactoring it into a non-inline function saved ~400 bytes of code.
It should be safe in terms of performance, all occurrences are at non-time critical spots.
Add an additional parameter to control the position of second choice
prompt position (while defaulting to the old).
This allows Yes/No prompts to be equally spaced.
Modify lcd_show_multiscreen_message_two_choices_and_wait_P to also
handle single-screen or empty (no-clear) prompts, making other functions
redundant. Saves 76 bytes.
Change existing functions to simply call
lcd_show_multiscreen_message_two_choices_and_wait_P with the correct
arguments.
This changes the prompt of existing Yes/No messages: the previous prompt
would use the last two lines of the LCD, while the new prompt is using
just the last line of the LCD instead.
Translation do not require updates, since the Yes/No translation was
already the same in both implementations.
Allow running the model checking during autotuning, with the only
exception being the parameter estimation stage where we alter the same
value which is used by the checker (done to conserve memory/code).
With previous changes the model checker will disable/enable itself when
passing through an unavailable R vector entry, allowing to start the
calibration by checking only the stages where the part fan is disabled.
The C/R0 values should be stable enough to provide a fail-safe mechanism
for printers of the same variant right from the factory.
Instead of assuming the model state is always valid, allow NAN values to
pass-through the various check/estimation stages.
This allows running the model checker with incomplete parameters (for
example, missing entries in the R vector) and resume automatically.
flash: -22
RAM: 0
menu_lcd_lcdupdate_func() takes care of starting lcd_timeoutToStatus if the knob is clicked.
When the knob is clicked we only want to back out of the menu.
This changes makes the menus slightly more conistant behind the scenes.
flash: -8
RAM: 0
When the menu is entered and left the function
menu_lcd_lcdupdate_func() takes care of resetting the timer.
Currently the firmware will reset the timer twice when the lcd_babystep_z menu is entered. This commit fixes that.