Plane: fixed build without terrain

This commit is contained in:
Andrew Tridgell 2020-06-23 08:37:11 +10:00
parent 847452f01b
commit eabe320cee

View File

@ -88,6 +88,7 @@ bool AP_Arming_Plane::pre_arm_checks(bool display_failure)
}
}
#if AP_TERRAIN_AVAILABLE
if (plane.g.terrain_follow || plane.mission.contains_terrain_relative()) {
// check terrain data is loaded and healthy
uint16_t terr_pending=0, terr_loaded=0;
@ -100,6 +101,7 @@ bool AP_Arming_Plane::pre_arm_checks(bool display_failure)
ret = false;
}
}
#endif
if (plane.control_mode == &plane.mode_auto && plane.mission.num_commands() <= 1) {
check_failed(display_failure, "No mission loaded");