From 8ab3b0db37e1e05b353ac7b35f48865a0a59e496 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 12 Mar 2024 14:20:01 +1100 Subject: [PATCH] AP_GPS: correct update_primary check takes an instance, not a type --- libraries/AP_GPS/AP_GPS.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 426b1666c2..b31ae5c848 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1182,7 +1182,7 @@ void AP_GPS::update_primary(void) significant lagged and gives no more information on position or velocity */ - const bool using_moving_base = (is_rtk_base(_type[0]) || is_rtk_base(_type[1])); + const bool using_moving_base = is_rtk_base(0) || is_rtk_base(1); if ((GPSAutoSwitch)_auto_switch.get() == GPSAutoSwitch::BLEND && !using_moving_base) { _output_is_blended = calc_blend_weights(); // adjust blend health counter @@ -1234,8 +1234,8 @@ void AP_GPS::update_primary(void) // rover as it typically is in fix type 6 (RTK) whereas base is // usually fix type 3 for (uint8_t i=0; i= GPS_OK_FIX_3D) || (state[i].status >= state[i^1].status))) { if (primary_instance != i) { _last_instance_swap_ms = now;