mirror of https://github.com/ArduPilot/ardupilot
Copter: allow fence to be disabled while AFS is enabled
This commit is contained in:
parent
bb9af3b79d
commit
e66034f183
|
@ -79,6 +79,11 @@ void Copter::failsafe_check()
|
|||
void Copter::afs_fs_check(void)
|
||||
{
|
||||
// perform AFS failsafe checks
|
||||
g2.afs.check(failsafe.last_heartbeat_ms, fence.get_breaches() != 0, last_radio_update_ms);
|
||||
#if AC_FENCE
|
||||
const bool fence_breached = fence.get_breaches() != 0;
|
||||
#else
|
||||
const bool fence_breached = false;
|
||||
#endif
|
||||
g2.afs.check(failsafe.last_heartbeat_ms, fence_breached, last_radio_update_ms);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue