From 339dd33240cf2420104a905aedbf0ae86e000a82 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 21 Sep 2022 23:13:20 +1000 Subject: [PATCH] AP_Terrain: correct compilation with rally disabled --- libraries/AP_Terrain/AP_Terrain.cpp | 2 ++ libraries/AP_Terrain/TerrainMission.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libraries/AP_Terrain/AP_Terrain.cpp b/libraries/AP_Terrain/AP_Terrain.cpp index 2c50a825eb..deb98ae733 100644 --- a/libraries/AP_Terrain/AP_Terrain.cpp +++ b/libraries/AP_Terrain/AP_Terrain.cpp @@ -345,8 +345,10 @@ void AP_Terrain::update(void) // check for pending mission data update_mission_data(); +#if HAL_RALLY_ENABLED // check for pending rally data update_rally_data(); +#endif // update tiles surrounding our current location: if (pos_valid) { diff --git a/libraries/AP_Terrain/TerrainMission.cpp b/libraries/AP_Terrain/TerrainMission.cpp index 381bc6bc55..ec39b6eca7 100644 --- a/libraries/AP_Terrain/TerrainMission.cpp +++ b/libraries/AP_Terrain/TerrainMission.cpp @@ -115,6 +115,7 @@ void AP_Terrain::update_mission_data(void) #endif // AP_MISSION_ENABLED } +#if HAL_RALLY_ENABLED /* check that we have fetched all rally terrain data */ @@ -171,5 +172,6 @@ void AP_Terrain::update_rally_data(void) next_rally_index++; } } +#endif #endif // AP_TERRAIN_AVAILABLE