Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for a wrong checksum truncation for certain commands
Positioning of string terminator to truncate checksum from the commands M23, M28, M30, M32, M928 and M117 was off by one, causing the last letter of the actual command to be truncated instead of just the checksum. In case of the SD commands this caused checksummed commands targeting existing files to fail since the last letter of the filename was truncated. In case of M117 this caused the last given letter not to be displayed. This patch fixes the off-by-one error and sets the null terminator on the exact position of the * starting the checksum instead of the character before that.
- Loading branch information
2d22902
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the right change considering the reality of how stuff works. Yes, the gcode page says fields are supposed to be separated by white space or line breaks, no, this is not how it's implemented across all slicers and other host software or as it's stated in the nist gcode standard. So the firmware has to cope with that reality. Which it does just fine for defined named fields (X, Y, Z, S, etc) but before this patch not for textual parameters which according to the wiki page don't even exist.
And keeping the patch as minimally invasive as possible keeps it hopefully better mergable across the millions of forks out there.