Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Conversation

@Lukanite
Copy link
Contributor

@Lukanite Lukanite commented Apr 9, 2021

Fix bug where some L76 messages are ignored due to the checksum being one digit long (i.e. 'F') vs. the expected 2 digit length ('0F')

(Hi! 👋 Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.)

What does this implement/fix? Explain your changes.

Sometimes, messages written to the L76 are ignored due to an invalid checksum

Does this close any currently open issues?

None afaik

Any relevant logs, error output, etc?

(If it’s long, please paste to https://gist.github.com and insert the link here)
l76.write("PMTK740,{},{},{},{},{},{}".format(curtime[0], curtime[1], curtime[2], curtime[3], curtime[4], curtime[5])) used to result in
$PMTK740,2021,4,8,19,0,57*6 being sent, which was missing the second checksum digit, causing the message to be ignored

Any other comments?

Where has this been tested?

  • Board type and hardware version:
    Pytrack 2.0X, GPY 1.0
  • os.uname() output:
    (sysname='GPy', nodename='GPy', release='1.20.2.r4', version='v1.11-ffb0e1c on 2021-01-12', machine='GPy with ESP32', pybytes='1.6.1')

Fix bug where some L76 messages are ignored due to the checksum being one digit long (i.e. 'F') vs. the expected 2 digit length ('0F')
Copy link
Contributor

@gijsio gijsio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, I do indeed believe this is a bug in edge-cases where the (insignificant) 0 on the checksum is dropped. The fix looks good to me!

I noticed the 740 packet ID is not included in the default documentation, but can be found in the extended documentation to set the time on the GPS chip to improve the time to first fix if Im correct?

@gijsio gijsio merged commit f4845e6 into pycom:master Apr 12, 2021
@Lukanite
Copy link
Contributor Author

Yeah, that's right. Looks like some of the commands from other products just happen to work, so I've been trying 740 (time)/741 (position):
https://cdn.sparkfun.com/assets/b/c/4/4/5/AirPrime_XM_XA_Series_Software_User_Guide_r3.pdf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants