From 93ea2c82a73ce213bcdbad457342cb2dc732b4fb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 31 Aug 2024 19:56:53 +1000 Subject: [PATCH] AP_GPS: define GPS_BLENDED_INSTANCE any time AP_GPS_BLENDED_ENABLED otherwise someone can explicity ebable it but not have a blended instance ID --- libraries/AP_GPS/AP_GPS_config.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS_config.h b/libraries/AP_GPS/AP_GPS_config.h index 6b114f156a15b5..08ebdac6059386 100644 --- a/libraries/AP_GPS/AP_GPS_config.h +++ b/libraries/AP_GPS/AP_GPS_config.h @@ -35,15 +35,16 @@ #if !defined(AP_GPS_BLENDED_ENABLED) && defined(GPS_MAX_INSTANCES) #define AP_GPS_BLENDED_ENABLED AP_GPS_BACKEND_DEFAULT_ENABLED && GPS_MAX_INSTANCES > GPS_MAX_RECEIVERS -#if AP_GPS_BLENDED_ENABLED -#define GPS_BLENDED_INSTANCE GPS_MAX_RECEIVERS // the virtual blended GPS is always the highest instance (2) -#endif #endif #ifndef AP_GPS_BLENDED_ENABLED #define AP_GPS_BLENDED_ENABLED 0 #endif +#if AP_GPS_BLENDED_ENABLED +#define GPS_BLENDED_INSTANCE GPS_MAX_RECEIVERS // the virtual blended GPS is always the highest instance (2) +#endif + #ifndef AP_GPS_DRONECAN_ENABLED #define AP_GPS_DRONECAN_ENABLED AP_GPS_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_DRONECAN_DRIVERS #endif