Skip to content

AP_GPS: fixed the check for disabling CONFIG_RATE_SOL config - #29320

Merged
tridge merged 2 commits into
ArduPilot:masterfrom
tridge:pr-fix-M10-GPS-config
Feb 25, 2025
Merged

AP_GPS: fixed the check for disabling CONFIG_RATE_SOL config#29320
tridge merged 2 commits into
ArduPilot:masterfrom
tridge:pr-fix-M10-GPS-config

Conversation

@tridge

@tridge tridge commented Feb 18, 2025

Copy link
Copy Markdown
Contributor

we should stop looking for SOL as soon as we know we have PVT, instead of waiting for all others to be cleared

may help with
https://discuss.ardupilot.org/t/fc-tries-to-config-gps-constantly-when-trying-to-arm-in-loiter-mode/129930

@tridge
tridge force-pushed the pr-fix-M10-GPS-config branch from e6b7865 to 6ade8a5 Compare February 19, 2025 09:21
@peterbarker

Copy link
Copy Markdown
Contributor

I bisected the bug, this was the result:

a9dc7b440f7a5b9418733c7b88743767c38623d4 is the first bad commit
commit a9dc7b440f7a5b9418733c7b88743767c38623d4
Author: Andy Piper <github@andypiper.com>
Date:   Mon Apr 29 15:46:53 2024 +0100

    AP_GPS: support GPSx_GNSS_MODE for F9P
    
    support detecting F9P hardware variant
    fix bug in extension buffer management
    support NEO-F9P GNSS configuration
    allow multiple configuration values to be set in one go
    phase F9 configuration to account for GNSS reset

@andyp1per

Copy link
Copy Markdown
Contributor

@peterbarker looks right but will need testing on F9P if you did not do that already

Comment thread libraries/AP_GPS/AP_GPS_UBLOX.cpp Outdated
Debug("Sending M10 settings");

// don't mix F9 and M10
_unconfigured_messages &= ~CONFIG_F9;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't help but wonder whether a tweak to the code affected by the patch which introduced the problems might be better. In particular:

@@ -334,6 +336,12 @@ AP_GPS_UBLOX::_request_next_config(void)
         }
         break;
     case STEP_POLL_GNSS:
+        if (supports_F9_config()) {
+            if (last_configured_gnss != params.gnss_mode) {
+                _unconfigured_messages |= CONFIG_F9;
+            }
+            break;
+        }
         if (!_send_message(CLASS_CFG, MSG_CFG_GNSS, nullptr, 0)) {
             _next_message--;
         }

Renaming "supports_f9_config" to "supports_valget_and_valset()` might stop this happening again?

@MallikarjunSE

Copy link
Copy Markdown
Contributor

@peterbarker do you suggest testing on F10N too?

we should stop looking for SOL as soon as we know we have PVT, instead
of waiting for all others to be cleared

may help with
https://discuss.ardupilot.org/t/fc-tries-to-config-gps-constantly-when-trying-to-arm-in-loiter-mode/129930
@tridge
tridge force-pushed the pr-fix-M10-GPS-config branch from 6ade8a5 to b5ae8b6 Compare February 24, 2025 04:13
if we get an unexpected VALSET NACK we could dereference NULL. This
could happen if we reboot while configuring an invalid key
@tridge

tridge commented Feb 24, 2025

Copy link
Copy Markdown
Contributor Author

@andyp1per I have tested GPS1_GNSS_MODE with F9P and it still works fine

@peterbarker

Copy link
Copy Markdown
Contributor

Unrelated to this PR, but it looks like we leak config_GNSS when the UBLOX backend is deleted.

@tridge
tridge merged commit 500d190 into ArduPilot:master Feb 25, 2025
@timtuxworth

timtuxworth commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

This has also have fixed a problem I was seeing with the QioTek M10S GPS.

@rmackay9

Copy link
Copy Markdown
Contributor

this is included in 4.6.0-beta5

@rmackay9 rmackay9 moved this from Pending to 4.6.0-beta5 in 4.6 Backports Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 4.6.0-beta5

Development

Successfully merging this pull request may close these issues.

7 participants