Skip to content

Commit

Permalink
AP_GPS: define GPS_BLENDED_INSTANCE any time AP_GPS_BLENDED_ENABLED
Browse files Browse the repository at this point in the history
otherwise someone can explicity ebable it but not have a blended instance ID
  • Loading branch information
peterbarker committed Aug 31, 2024
1 parent c858bd2 commit 93ea2c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/AP_GPS/AP_GPS_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93ea2c8

Please sign in to comment.