sparkfun / Qwiic_Ublox_Gps_Py

https://qwiic-ublox-gps-py.readthedocs.io/en/latest/index.html
Other
69 stars 41 forks source link

Add Windows/Mac compatibility, implement the UBX-RXM-RAWX message, fix timeout bug. #14

Open davidallen353 opened 3 years ago

davidallen353 commented 3 years ago

This pull request includes 3 distinct changes.

  1. There does not appear to be a version of the spidev module that functions natively on Mac or Windows. I added code to bypass the SPI functionality if not on a linux system. A useful warning when this bypass is triggered.
  2. The core.Parse._read_until() static method will continue to read until it finds a terminator. However this method bypasses the timeout, so if the read misses the terminator, then it will continue indefinitely. I used the timeout defined by the stream input to act as a timeout for the read. If the timeout is reached before the terminator is found, a SerialException is raised.
  3. I added the UBX-RXM-RAWX message that includes pseudorange, carrier phase, and doppler measurements.

These changes were tested on a F9P and M8N. (Note the M8N doesn't support RAWX)

davidallen353 commented 3 years ago

I just looked at PR #10 and the separate NMEA/UBX parsing may make the timeout bug that I found difficult to replicate. I was seeing a bunch of NMEA messages come over the serial port when it missed the terminator, so it is possible that splitting NMEA and UBX would fix everything.

davidallen353 commented 3 years ago

@edspark Is there anything that you need before considering this pull request?