AC_Fence: relax sys-status healthy reporting #12724
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During 4.0.0 testing I found that "Geofence Breach" was constantly displayed on the mission planner HUD (issue).
The cause of the issue is AC_Fence::sys_status_failed() call which is too strict in my opinion at least if it's going to be interpreted as "Breached" by the GCSs.
I understand the desire to want to warn the user of incorrect setup but I think we should do that as part of the pre-arm checks. We risk overloading the user with errors which is unnecessarily scary and just teaches them to ignore errors. There's no point in us telling the user "Geofence Breached" when really the issue is they don't have a GPS lock yet.
This PR changes it so this flag is really only unset if a geofence is breached.