mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
ArduCopter: use fence singleton in afs check
This commit is contained in:
parent
ad0df546a7
commit
7ed190c163
@ -79,11 +79,6 @@ void Copter::failsafe_check()
|
|||||||
void Copter::afs_fs_check(void)
|
void Copter::afs_fs_check(void)
|
||||||
{
|
{
|
||||||
// perform AFS failsafe checks
|
// perform AFS failsafe checks
|
||||||
#if AP_FENCE_ENABLED
|
g2.afs.check(last_radio_update_ms);
|
||||||
const bool fence_breached = fence.get_breaches() != 0;
|
|
||||||
#else
|
|
||||||
const bool fence_breached = false;
|
|
||||||
#endif
|
|
||||||
g2.afs.check(fence_breached, last_radio_update_ms);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user