-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Using TFMini v1.8 device the frame size is 7. The code that calculates the checksum adds all positions that are less than frame size - 2. I found that the checksum was always 9 greater than the calculation. Position 5 is always 9 but not included in the calculation.
This caused the following error:
TF Mini error: too many measurement attempts
Last error:
ERROR_SERIAL_BADCHECKSUM
65535 cm sigstr: 65535
After changing the calculation to include position 5 like so:
if (i < TFMINI_FRAME_SIZE-1) { checksum += frame[i]; }
instead of:
if (i < TFMINI_FRAME_SIZE-2) { checksum += frame[i]; }
Things are now working.
I'm not sure what the frame size is of other TF Devices. Are they different? Maybe older versions have a frame size of 8? Anyway, just wanted to report what I found.