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

Add I2C support and various example fixes #36

Closed ladyada closed 4 years ago

ladyada commented 4 years ago

Added GPS_I2C for interfacing with simple I2C implementations of GPS modules Updated all examples to have UART, pyserial and I2C definitions Fixed weird huge timeouts in UART examples Removed 'computer' datalogging demo and merged it with the non-computer datalogging demo Fixed datalogging demo which was missing some imports. Tested on Windows+I2C and Feather M4 Fixed RTC demo, was based on old circuitpython, tested with I2C GPS Parser now accepts $GN NMEA's used in more modern modules

caternuson commented 4 years ago

Looks like you are wanting to not make this a breaking change? Otherwise could maybe refactor the classes more like other multi-interface drivers do.

Current (UART only):

GPS

Refactor (breaking)

GPS
GPS_UART(GPS)
GPS_I2C(GPS)
ladyada commented 4 years ago

correct, also because theres one standard UART interface, but there may be variable I2C/SPI interfaces (they aren't standardized). default GPS should be UART!

caternuson commented 4 years ago

ah, ok. should GPS_I2C be renamed then to reflect that? as is, sounds generic. as if it is standardized.

ladyada commented 4 years ago

could rename it GPS_GTopI2C ?

caternuson commented 4 years ago

yah. something like that. i don't know the specifics enough to suggest any better. just concerned about implying that there is a standard I2C interface by having just GPS_I2C. and if/when more interfaces get added, what would they be named.

sounds like GTop is the specific interface here?

ladyada commented 4 years ago

yeah its used for GTop modules 🤷‍♂ :) ill submit changes

ladyada commented 4 years ago

@caternuson finally had time to do this! please check it out - tested :)

caternuson commented 4 years ago

Yep. Looks good. Just a simple naming convention, but seems like a good idea.

ladyada commented 4 years ago

yaaayyy! doing SPI next