Skip to content

Commit

Permalink
AP_DDS: Make GPS DDS features depend on GPS
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 committed Oct 7, 2024
1 parent 47d391f commit 72d29f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_DDS/AP_DDS_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

#if AP_DDS_ENABLED
#include <uxr/client/util/ping.h>
#include <AP_GPS/AP_GPS_config.h>

#if AP_DDS_NEEDS_GPS
#include <AP_GPS/AP_GPS.h>
#endif // AP_DDS_NEEDS_GPS
#include <AP_HAL/AP_HAL.h>
#include <RC_Channel/RC_Channel.h>
#include <AP_RTC/AP_RTC.h>
Expand Down
8 changes: 6 additions & 2 deletions libraries/AP_DDS/AP_DDS_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
#endif

#ifndef AP_DDS_NAVSATFIX_PUB_ENABLED
#define AP_DDS_NAVSATFIX_PUB_ENABLED 1
#define AP_DDS_NAVSATFIX_PUB_ENABLED AP_GPS_ENABLED
#endif

#ifndef AP_DDS_STATIC_TF_PUB_ENABLED
#define AP_DDS_STATIC_TF_PUB_ENABLED 1
#define AP_DDS_STATIC_TF_PUB_ENABLED AP_GPS_ENABLED
#endif

#ifndef AP_DDS_GPS_GLOBAL_ORIGIN_PUB_ENABLED
Expand Down Expand Up @@ -84,6 +84,10 @@
// Whether to include Transform support
#define AP_DDS_NEEDS_TRANSFORMS AP_DDS_DYNAMIC_TF_SUB || AP_DDS_STATIC_TF_PUB_ENABLED

// Whether DDS needs GPS
#define AP_DDS_NEEDS_GPS AP_DDS_NAVSATFIX_PUB_ENABLED || AP_DDS_STATIC_TF_PUB_ENABLED
#if AP_DDS_NEEDS_GPS

#ifndef AP_DDS_DEFAULT_UDP_IP_ADDR
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
#define AP_DDS_DEFAULT_UDP_IP_ADDR "192.168.13.2"
Expand Down

0 comments on commit 72d29f2

Please sign in to comment.