-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Gps reset detect #8302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Gps reset detect #8302
Conversation
Good news - the NMEA setup (GSA and GSV configuration) will run after the detection, regardless of how it's done within that method - see line 656 |
TODO: check every variant that sets GPS_RESET to see if we need to change the ifdef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves GPS reset detection timing and logging by moving the GPS reset to occur during the probing phase after serial speed changes. The change aims to prevent potential GPS confusion from odd characters sent when changing serial speeds, and adds detection for specific GPS chip models based on boot messages.
- Moved GPS reset timing from initialization to the probe phase after serial speed configuration
- Added GPS chip detection based on boot messages for AG3335, AG3352, RYS3520, and UC6580 models
- Fixed format specifier warnings in logging statements from %ld to %lu for unsigned values
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/gps/RTC.cpp | Fixed format specifiers in LOG_WARN statements to use %lu for unsigned values |
src/gps/GPS.cpp | Moved GPS reset logic to probe phase and added chip detection based on boot messages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
A couple logging improvements, and then changing the GPS reset timing to happen during probing, right after the serial speed is changed.
The theory is that changing the serial speed may send odd characters up the serial line, and confuse the GPS.
Additionally, this GPS has been observed to output
$PAIR021,AG3335M_V2.6.0.AG3335_20221230
spontaneously after a reset, so we can identify the chip based on that output.I've further tested on the Heltec tracker and the Heltec v4, and added GPS reset model detection for those.