19 Commits

Author SHA1 Message Date
deadprogram 0e2fb829ef gps: improvements and corrections for config commands
This contains some improvements and corrections for the gps driver
It adds some additional functions for different modes (automobile, bike, etc)
and also ignores the return results from any config commands.

Basically due to the fact that there is a constant stream of updates
coming from NMEA messages, the results from sending any UBX commands
are getting lost. Better to just ignore them for now.

Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-14 19:55:43 +00:00
deadprogram 892265b733 gps: export some errors for checking/supression from client
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-08 13:05:41 +00:00
Pat Whittingslow b390e3225a Suggestions by pato for GPS UBX support (#831)
* apply suggestions by pato

* whoopsie on inverted condition
2026-01-08 13:05:41 +00:00
deadprogram 1513808425 gps: revamp validSentence() to avoid heap allocation for errors. This error can occur too frequently to allow for such allocations
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-08 13:05:41 +00:00
deadprogram 0a41786a77 gps: improve implementation for UBX config commands
Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-01-08 13:05:41 +00:00
Russel Hunter Yukawa a31ba26a6c Fix gps time calculation (#785)
* Change test case to match the date patterns where the bug reproduces
* Fix RMC date and time calculation
2025-08-13 09:39:18 +02:00
JP Hastings-Spital 45fad80c3e feat: allow gps init with address
Adafruit's Mini GPS PA1010D Module works with this device driver, but requires 0x10 as the address, rather than 0x42.

This change allows the device to be initialised with whatever i2c address is needed, while maintaining backward compatibility.

Adds new constants to allow easy configuration of both the ublox device and the PA1010D.
2025-08-10 10:05:18 +02:00
Pablo Canseco bf53cb2fd4 [gps] make the date available in addition to the time (#532)
gps: also parse the date from an RMC sentence. Add coverage to unit test so it also asserts on time and date.
2023-04-13 09:52:57 +02:00
deadprogram f2637a87d2 gps: improve parsing and add tests to verify
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-01-17 07:48:22 +01:00
deadprogram ecb343b3b3 gps: improve error handling
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-01-17 07:48:22 +01:00
deadprogram 0b62d4fb4a gps: add support for GLL sentence type, add original sentence to gps errors
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-01-17 07:48:22 +01:00
deadprogram 5b461ec2d1 gps: improve error handling
Signed-off-by: deadprogram <ron@hybridgroup.com>
2023-01-17 07:48:22 +01:00
Ayke van Laethem e77e9249cd all: use interfaces for UART objects
This makes it possible to replace UART objects with dummy
implementations, for example. Or allows changing the `machine.UART` type
to `*machine.UART` without breaking compatibility.
2021-04-02 17:31:28 +02:00
deadprogram db02cbb8a4 i2c: switch all i2c drivers definitions to use i2c bus interface type instead of machine package concrete type
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-08-29 17:19:27 +02:00
deadprogram 4f82c06df9 gps: add speed and heading to fix, as parsed from RMC NMEA sentence
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-08-21 07:24:41 +02:00
Ron Evans 5df96c8138 gps: improvements and bugfixes (#186)
* gps: buxfixes and refactoring of API to separate device from parser

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gps: simplify time parser

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gps: add support for RMC sentences

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gps: small renaming to remove reduntant use of word GPS

Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-08-20 11:22:07 +02:00
Daniel Esteban cb49783f18 Error strings should not be capitalized (unless beginning with proper
nouns or acronyms) or end with punctuation, since they are usually
printed following other context.
2019-07-08 18:52:31 +02:00
Ron Evans c09f0a8075 all: switch to using custom domain for all drivers
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-29 13:33:50 +02:00
Anthony Elder a24657d1eb GPS driver (#55)
* u-blox GPS driver for both I2C and UART
2019-05-23 15:29:29 +02:00