AC_Fence: always clear breaches

This commit is contained in:
Iampete1 2022-09-10 22:03:02 +01:00 committed by Randy Mackay
parent 64b1277a66
commit d066588c91

View File

@ -543,14 +543,14 @@ uint8_t AC_Fence::check()
{
uint8_t ret = 0;
// clear any breach from a non-enabled fence
clear_breach(~_enabled_fences);
// return immediately if disabled
if ((!_enabled && !_auto_enabled) || !_enabled_fences) {
return 0;
}
// clear any breach from a non-enabled fence
clear_breach(~_enabled_fences);
// check if pilot is attempting to recover manually
if (_manual_recovery_start_ms != 0) {
// we ignore any fence breaches during the manual recovery period which is about 10 seconds