firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Optimise GPS Baud Rate cycle

Open fifieldt opened this issue 1 year ago • 1 comments

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.

fifieldt avatar Oct 20 '24 01:10 fifieldt

This is currently untested, please don't merge until we test on a wide range of devices :) ed: now tested.

fifieldt avatar Oct 20 '24 01:10 fifieldt

Beginning testing.

fifieldt avatar Nov 02 '24 02:11 fifieldt

  • 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

fifieldt avatar Nov 02 '24 02:11 fifieldt

OK, tested with 7 different GPSes across several devices and this works nicely. Ready for review.

fifieldt avatar Nov 02 '24 03:11 fifieldt

@fifieldt do we want to apply the GPS_BAUDRATE_FIXED macro to variants as a part of this PR as well?

thebentern avatar Nov 02 '24 11:11 thebentern

@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?

fifieldt avatar Nov 02 '24 11:11 fifieldt

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.

thebentern avatar Nov 02 '24 12:11 thebentern