From d298980969e639e624e405d3acc10eb26a7c1f45 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 21 Jul 2020 11:56:10 +1000 Subject: [PATCH] SITL: correct AP_Terrain cast-align compilation failure on SITL_arm_linux_gnueabihf --- libraries/SITL/SIM_Aircraft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SITL/SIM_Aircraft.cpp b/libraries/SITL/SIM_Aircraft.cpp index 5a9139ee09..84b6f7910e 100644 --- a/libraries/SITL/SIM_Aircraft.cpp +++ b/libraries/SITL/SIM_Aircraft.cpp @@ -82,7 +82,7 @@ Aircraft::Aircraft(const char *frame_str) : sitl->ahrs_rotation_inv = sitl->ahrs_rotation.transposed(); } - terrain = reinterpret_cast(AP_Param::find_object("TERRAIN_")); + terrain = &AP::terrain(); } void Aircraft::set_start_location(const Location &start_loc, const float start_yaw)