Skip to content

Conversation

jp-bennett
Copy link
Collaborator

@jp-bennett jp-bennett commented Oct 11, 2025

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.

@jp-bennett jp-bennett added enhancement New feature or request gps labels Oct 11, 2025
@fifieldt
Copy link
Member

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

@fifieldt
Copy link
Member

TODO: check every variant that sets GPS_RESET to see if we need to change the ifdef

@thebentern thebentern requested a review from Copilot October 12, 2025 10:35
Copy link
Contributor

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants