mirror of https://github.com/ArduPilot/ardupilot
Copter: fixes to allow compiling without terrain support
This commit is contained in:
parent
74e02d2c82
commit
8e43be1511
|
@ -495,6 +495,7 @@ bool Copter::pre_arm_ekf_attitude_check()
|
|||
// check we have required terrain data
|
||||
bool Copter::pre_arm_terrain_check()
|
||||
{
|
||||
#if AP_TERRAIN_AVAILABLE && AC_TERRAIN
|
||||
// succeed if not using terrain data
|
||||
if (!terrain_use()) {
|
||||
return true;
|
||||
|
@ -504,6 +505,9 @@ bool Copter::pre_arm_terrain_check()
|
|||
uint16_t terr_pending, terr_loaded;
|
||||
terrain.get_statistics(terr_pending, terr_loaded);
|
||||
return (terr_pending <= 0);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
// arm_checks - perform final checks before arming
|
||||
|
|
|
@ -202,7 +202,7 @@ void Copter::init_ardupilot()
|
|||
|
||||
// init Location class
|
||||
Location_Class::set_ahrs(&ahrs);
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
#if AP_TERRAIN_AVAILABLE && AC_TERRAIN
|
||||
Location_Class::set_terrain(&terrain);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue