mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Arming: ensure fence enablement on arming is inverted on disarming
This commit is contained in:
parent
174d5f07bb
commit
3fabec4158
@ -1840,9 +1840,7 @@ bool AP_Arming::disarm(const AP_Arming::Method method, bool do_disarm_checks)
|
|||||||
#if AP_FENCE_ENABLED
|
#if AP_FENCE_ENABLED
|
||||||
AC_Fence *fence = AP::fence();
|
AC_Fence *fence = AP::fence();
|
||||||
if (fence != nullptr) {
|
if (fence != nullptr) {
|
||||||
if(fence->auto_enabled() == AC_Fence::AutoEnable::ONLY_WHEN_ARMED) {
|
fence->auto_disable_fence_on_disarming();
|
||||||
fence->enable_configured(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAL_ARM_GPIO_PIN)
|
#if defined(HAL_ARM_GPIO_PIN)
|
||||||
|
Loading…
Reference in New Issue
Block a user