-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EEPROM Checksum is either last char or last char+1 #158
Comments
drf5n
added a commit
to drf5n/grbl-Mega
that referenced
this issue
Apr 11, 2022
Per gnea#158 The logical OR squashes the previous checksum down to 1 bit of information, resulting in the final checksum being either the last character written, or one plus the last character written. This change switches to the bitwise-or to convert the squashing into a 1-bit roll to the left.
See grblHAL's checksum implementation in https://github.com/grblHAL/core/blob/3a84b58d301f04279268b4ef1045fd6bc0961be5/nuts_bolts.c#L267-L278 |
drf5n
added a commit
to drf5n/grbl-Mega
that referenced
this issue
Apr 11, 2022
Per gnea#158 the logical OR discards most of the checksum information, resulting in the final chekcsum being either the last character, or the last character +1. This fix brings the checksum in-line with grblHAL's implementation: https://github.com/grblHAL/core/blob/3a84b58d301f04279268b4ef1045fd6bc0961be5/nuts_bolts.c#L267-L278
See also GRBL issue # grbl#1249 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That looks like it was a typo -- it squashes the checksum down to a single bit of information, when it looks like it intended to roll it right one bit, so the final checksum ends up either zero or one larger than the last character in the data:
grbl-Mega/grbl/eeprom.c
Lines 130 to 149 in df87b36
Maybe it was supposed to be
Originally posted by @drf5n in #157 (comment)
The text was updated successfully, but these errors were encountered: