AP_DDS: Correct compilation of tests without external odom

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
This commit is contained in:
Ryan Friedman 2024-09-20 19:44:38 -06:00 committed by Randy Mackay
parent d2d1b11643
commit 24036518a2
1 changed files with 6 additions and 0 deletions

View File

@ -1,9 +1,13 @@
#include <AP_gtest.h>
#include <AP_DDS/AP_DDS_config.h>
#include <AP_DDS/AP_DDS_External_Odom.h>
#include "geometry_msgs/msg/TransformStamped.h"
#include <AP_HAL/AP_HAL.h>
#if AP_DDS_VISUALODOM_ENABLED
const AP_HAL::HAL &hal = AP_HAL::get_HAL();
TEST(AP_DDS_EXTERNAL_ODOM, test_is_odometry_success)
@ -35,4 +39,6 @@ TEST(AP_DDS_EXTERNAL_ODOM, test_is_odometry_success)
ASSERT_FALSE(AP_DDS_External_Odom::is_odometry_frame(msg));
}
#endif // AP_DDS_VISUALODOM_ENABLED
AP_GTEST_MAIN()