Skip to content
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

Update GPSUpdateScheduling.cpp #5160

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Conversation

spiffysec
Copy link
Contributor

Default value is too short, resulting in unstable GPS locks on T1000-E (possibly others). Fix has been tested an confirmed working with no adverse effects, by multiple users. Also discussed at length on Discord

Default value is too short, resulting in unstable GPS locks on T1000-E (possibly others). Fix has been tested an confirmed working with no adverse effects, by multiple users. Also discussed at length on Discord
Copy link
Contributor

@Nestpebble Nestpebble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest making it T1000E specific, like this:

// Have we been searching for a GPS position for too long?
bool GPSUpdateScheduling::searchedTooLong()
{
#if !defined(_VARIANT_TRACKER_T1000_E_)
    uint32_t maxSearchMs =
        Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs, default_broadcast_interval_secs);

#elif defined(_VARIANT_TRACKER_T1000_E_)
// T1000000000E tracker seems to need much longer to search for a decent lock
// The default is 5 minutes (300s). 15 minutes seems to work ok.
    uint32_t maxSearchMs = 15*60*1000;

#endif

Maybe this is too cumbersome, tho?

@thebentern
Copy link
Contributor

thebentern commented Oct 27, 2024

Interesting. config.position.position_broadcast_secs should already be defaulted to 15 minutes. Are your Seeed studio cards coming pre-configured with 5 minutes? We probably should just put a minimum gate on this value.

@thebentern thebentern closed this Oct 27, 2024
@thebentern thebentern reopened this Oct 27, 2024
@b8b8
Copy link

b8b8 commented Oct 27, 2024

The RAK 12500 GPS may also benefit from this change

@thebentern
Copy link
Contributor

Updated this with the minimum time coerce logic for now. We'll be revisiting this for a more long term fix that takes into account the extended cold lock times vs subsequent ones, but for now, this fixes a lot of folks having GPS issues

@thebentern thebentern merged commit 77dfc92 into meshtastic:master Oct 28, 2024
46 of 47 checks passed
@spiffysec spiffysec deleted the patch-1 branch October 30, 2024 19:27
@spiffysec spiffysec restored the patch-1 branch October 30, 2024 19:44
fifieldt added a commit to fifieldt/meshtastic-firmware that referenced this pull request Nov 3, 2024
meshtastic#5160 introduced a change
which made first publication of GPS information take up to 15mins.
For that initial period, displays would show "No GPS Present", even
if one was detected.

This change fixes that bug, triggering publication immediately after
a GPS module is detected.
fifieldt added a commit to fifieldt/meshtastic-firmware that referenced this pull request Nov 3, 2024
meshtastic#5160 introduced a change
which made first publication of GPS information take up to 15mins.
For that initial period, displays would show "No GPS Present", even
if one was detected.

This change fixes that bug, triggering publication immediately after
a GPS module is detected.
thebentern pushed a commit that referenced this pull request Nov 3, 2024
#5160 introduced a change
which made first publication of GPS information take up to 15mins.
For that initial period, displays would show "No GPS Present", even
if one was detected.

This change fixes that bug, triggering publication immediately after
a GPS module is detected.
caveman99 pushed a commit that referenced this pull request Nov 3, 2024
* Update GPSUpdateScheduling.cpp

Default value is too short, resulting in unstable GPS locks on T1000-E (possibly others). Fix has been tested an confirmed working with no adverse effects, by multiple users. Also discussed at length on Discord

* Coerce minimum instead of hardcode

* config

---------

Co-authored-by: Ben Meadors <[email protected]>
caveman99 pushed a commit that referenced this pull request Nov 3, 2024
#5160 introduced a change
which made first publication of GPS information take up to 15mins.
For that initial period, displays would show "No GPS Present", even
if one was detected.

This change fixes that bug, triggering publication immediately after
a GPS module is detected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants