Make the variable static within the checkautostart function.
When the function is called for the first time autostart_stilltocheck
is set to true and will continue to live after the function is exited.
After it is set to false within checkautostart() it will continue to be
false forever.
Using static this way is more efficient than using a global variable
Saves 6 bytes of flash and 1 byte of SRAM
"PINDA cal status:" is always printed no matter what cal_status is so we can pull that out of the conditional statment.
cal_status is also a boolean, lets just print it directly. Its a simpler code.
Saves 32 bytes of flash and 22 bytes of SRAM
Change serial messages to PGM
I could not see any difference in the functionality when testing this locally
Changes save 818 bytes of flash memory
(I suspect this is due to dtostrf no longer being called in the firmware for MK3S?)
We want to set the FINDA state IF the timer has not expired.
It is helpful to see why by looking at the commit which broke
this 802b8860c8
Without this fix my FINDA sensor just shows N/A. But after this commit is works perfectly.
Explicitly show which axes are affected on the status line when a crash
has been detected.
When the crash recovery prompt is triggered, also show all axes which
have been affected during the detection interval (currently X, Y, or
both).
The timer detection has been simplified to match the MK3 optical
filament timeout handling, which makes more sense: a crash immediately
following a crash recovery prompt will trigger the prompt again. The
timer needs to properly expire in order to reset the crash count.
This helps crash detection tuning (and help users reporting issues with
crash detection) without having to monitor the serial line.
This currently abuses the MSG_CRASH_DETECTED message by prepending the
[X][Y] labels to the message, which is ok in english but might not
translate that well for all languages.
Split off yes/no lcd handling from
lcd_show_fullscreen_message_yes_no_and_wait_P into a separate function
in order to allow generic requests where the text prompt can change.