0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-18 15:39:31 +00:00

Require a checksum when writing to SD (#10204)

When streaming commands to SD with XON/XOFF, errors can occur and cause incomplete commands to be written to the file. This change ensures that only commands with line numbers and checksum will be saved to SD.
This commit is contained in:
Adrian Cuzman 2018-03-28 20:43:41 +02:00 committed by Scott Lahteine
parent 677bd19dbf
commit f84f7e5a38

View file

@ -1070,6 +1070,10 @@ inline void get_serial_commands() {
gcode_LastN = gcode_N;
}
else if (card.saving) {
gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM));
return;
}
// Movement commands alert when stopped
if (IsStopped()) {