mirror of https://github.com/ArduPilot/ardupilot
Copter: update terrain db pre-arm checks
This commit is contained in:
parent
5d93c90782
commit
3cf65ce4ec
|
@ -162,6 +162,12 @@ bool AP_Arming_Copter::board_voltage_checks(bool display_failure)
|
||||||
// all data loaded
|
// all data loaded
|
||||||
bool AP_Arming_Copter::terrain_database_required() const
|
bool AP_Arming_Copter::terrain_database_required() const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (copter.wp_nav->get_terrain_source() == AC_WPNav::TerrainSource::TERRAIN_FROM_RANGEFINDER) {
|
||||||
|
// primary terrain source is from rangefinder, allow arming without terrain database
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (copter.wp_nav->get_terrain_source() == AC_WPNav::TerrainSource::TERRAIN_FROM_TERRAINDATABASE &&
|
if (copter.wp_nav->get_terrain_source() == AC_WPNav::TerrainSource::TERRAIN_FROM_TERRAINDATABASE &&
|
||||||
copter.mode_rtl.get_alt_type() == ModeRTL::RTLAltType::RTL_ALTTYPE_TERRAIN) {
|
copter.mode_rtl.get_alt_type() == ModeRTL::RTLAltType::RTL_ALTTYPE_TERRAIN) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue