adafruit / Adafruit_CircuitPython_GPS

GPS parsing module for CircuitPython. Meant to parse NMEA data from serial GPS modules.
MIT License
75 stars 58 forks source link

ValueError and IndexError or soft reboot in 3.10.6 #91

Open exipilis opened 1 year ago

exipilis commented 1 year ago

Receiver: Ublox NEO M8N. Controller: Bluefruit Sense nRF52840

Minimal code.py to reproduce:

from adafruit_gps import GPS
from board import UART
from time import sleep

gps = GPS(UART(), debug=True)
gps.send_command(b"PMTK220,1000")
sleep(1)
gps.send_command(b'PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0')

print(adafruit_gps.__version__)

while True:
    gps.update()
    print(gps.has_fix)
    sleep(0.1)

Sometimes I get soft reboot message.

Once in a while I get one of two errors:

File "adafruit_gps.py", line 302, in update File "adafruit_gps.py", line 460, in _parse_gll File "adafruit_gps.py", line 425, in _update_timestamp_utc ValueError: invalid syntax for integer with base 10

File "adafruit_gps.py", line 304, in update File "adafruit_gps.py", line 475, in _parse_rmc File "adafruit_gps.py", line 181, in _parse_data File "adafruit_gps.py", line 97, in _parse_degrees IndexError: list index out of range