ArduCopter: Ensure fence has opportunity to auto disable for landing

This commit is contained in:
James O'Shannessy 2021-02-19 23:47:28 +11:00 committed by Peter Barker
parent cfb648e1c5
commit f14e1c2799
2 changed files with 11 additions and 0 deletions

View File

@ -252,6 +252,7 @@ void ModeAuto::land_start(const Vector3f& destination)
copter.landinggear.deploy_for_landing();
#if AC_FENCE == ENABLED
// disable the fence on landing
copter.fence.auto_disable_fence_for_landing();
#endif
}

View File

@ -277,6 +277,11 @@ void ModeRTL::descent_start()
// optionally deploy landing gear
copter.landinggear.deploy_for_landing();
#if AC_FENCE == ENABLED
// disable the fence on landing
copter.fence.auto_disable_fence_for_landing();
#endif
}
// rtl_descent_run - implements the final descent to the RTL_ALT
@ -365,6 +370,11 @@ void ModeRTL::land_start()
// optionally deploy landing gear
copter.landinggear.deploy_for_landing();
#if AC_FENCE == ENABLED
// disable the fence on landing
copter.fence.auto_disable_fence_for_landing();
#endif
}
bool ModeRTL::is_landing() const