mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AC_Fence: relax sys-status healthy reporting
This commit is contained in:
parent
9211ac76a3
commit
f18e44616c
@ -452,30 +452,6 @@ bool AC_Fence::sys_status_failed() const
|
|||||||
if (get_breaches() != 0) {
|
if (get_breaches() != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_enabled_fences & AC_FENCE_TYPE_POLYGON) {
|
|
||||||
if (!_poly_loader.inclusion_boundary_available()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_enabled_fences & AC_FENCE_TYPE_CIRCLE) {
|
|
||||||
if (_circle_radius < 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_enabled_fences & AC_FENCE_TYPE_ALT_MAX) {
|
|
||||||
if (_alt_max < 0.0f) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((_enabled_fences & AC_FENCE_TYPE_CIRCLE) ||
|
|
||||||
(_enabled_fences & AC_FENCE_TYPE_POLYGON)) {
|
|
||||||
Vector2f position;
|
|
||||||
if (!AP::ahrs().get_relative_position_NE_home(position)) {
|
|
||||||
// both these fence types require position
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user