- Yes/no question --> Need to fix the bug related with the filename print --> if (lcd_show_fullscreen_message_yes_no_and_wait_P(altfilename, false, LCD_LEFT_BUTTON_CHOICE)==LCD_LEFT_BUTTON_CHOICE)
For remote hosts, when the timer is stopped, then also save the statistics.
Slightly refactored save_statistics function by removing the parameters.
The function parameters are always the same.
Change in memory:
Flash: -40 bytes
SRAM: 0 bytes
I changed the code a bit so it would compile
in Prusa Firmware.
The paused duration is no longer included in the
print time statistics.
Change in memory:
Flash: -122 bytes
SRAM: 0 bytes
Remove a few redundant language.h includes
Also remove language.h include from cmdqueue.h to prevent including language.h unnecessarily
Fix missing message.h includes in a few files
Since M310 cannot change the heaters, allowing M310 S0 (and changing
parameters) allows to recover a usb-controlled printer which has been
locked-out due to bad model settings.
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.
cmdqueue will run commands when EOF is reached without returning to the
main loop, which is already incorrect.
However, since it needs to ensure the queue is empty, an st_synchronize
call can result in a re-entrant call to get_command, which will
reprocess EOF again. Even if we removed st_synchronize, another command
could be picked by an unsuspecting manage_inactivity() somewhere else.
Short-circuit EOF processing by closing the file early and checking for
the file state early in get_command.
This should fix#3549
Do not inhibit motion when Stopped is set.
We actually do need to move to move away the extruder from the bed, and
setting Stopped breaks it without adding any sort of security (M*
commands, such as M600 could still perform moves and still pass
through, while M104 would still set heaters).
During a hard error the internal queue is cleared (and sd file closed,
if any), so no new "unforeseen" command can be read.
Handle "Stopped" instead as a flag to inhibit serial processing and
automatically switch to "paused for user" state. While in this state
simply drop any input without incrementing the processed gcode line
number, behaving as-if the last command was still being processed.
This allows "Stopped" to correctly handle a printer-initiated paused
state and recover as expected by requesting a resend when resuming.
PR #2967 altered the way ``sdpos_atomic`` was set, causing issues in the
crashdetect/powerpanic recovery offset if the instruction being
recovered happens to contain a comment.
Previously ``sdpos`` was assumed to be a single byte prior to the last
read character. sdpos+1 would thus position the index to the next
instruction. With gcode-filtering in place, sdpos is left just before
the comment, while the actual read position is at the newline. This
causes to parser to resume in the middle of the comment.
Change the value returned by cardreader::get_sdpos() to always return
the last read position, as everybody expects (!!).
This avoids the +1, and correctly sets the resume position to the next
valid instruction without overhead.