firmware
firmware copied to clipboard
Optimise GPS Baud Rate cycle
Previously, our baud rate cycled through one list twice.
There were some rarer baudrates in there, so this code separates out those into a dedicated list that is only run through if detection fails for common bauds. We also only run through each baud rate once.
This is currently untested, please don't merge until we test on a wide range of devices :) ed: now tested.
Beginning testing.
- T1000-E (AG3335@115200) OK (and speed much improved)
- ATGM332D@9600 OK
- heltec-wireless-tracker (UC6580@115200) OK
- tbeam (Neo-6M@9600) OK
- wio-tracker-wm1110 (L76K@9600) OK
- Ublox-9@38400 OK
- Ublox-10@38400 OK
OK, tested with 7 different GPSes across several devices and this works nicely. Ready for review.
@fifieldt do we want to apply the GPS_BAUDRATE_FIXED macro to variants as a part of this PR as well?
@fifieldt do we want to apply the GPS_BAUDRATE_FIXED macro to variants as a part of this PR as well?
I don't think there's a need set GPS_BAUDRATE_FIXED directly in variant.h? Just adds work for hardware makers when setting GPS_BAUDRATE does the job. Or are you saying there are other variants to set baud rates for?
I don't think there's a need set GPS_BAUDRATE_FIXED directly in variant.h? Just adds work for hardware makers when setting GPS_BAUDRATE does the job. Or are you saying there are other variants to set baud rates for?
I'm being a bonehead and the #ifdef GPS_BAUDRATE block in configuration.h sailed over my head.