-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fence warn at the margins #28840
base: master
Are you sure you want to change the base?
Fence warn at the margins #28840
Conversation
ce3674f
to
9fbfa49
Compare
libraries/AC_Fence/AC_Fence.cpp
Outdated
|
||
// emit a message indicated we're newly-breached, but not too often | ||
if (option_enabled(OPTIONS::MARGIN_BREACH) | ||
&& AP_HAL::timeout_expired(_last_margin_breach_notify_sent_ms, now, 1000U)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameterize "not too often"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm loathe to add another parameter unless its really required - we have many other repeating messages in warning situations that do not have a configurable repeat interval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, but this seems to be every second. (Do I have that wrong?) That seems pretty often to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, open to a better value - although you obviously can turn it off. You only get the warning when you are inside the fence but outside the margin - its supposed to be naggy.
9fbfa49
to
336ea4e
Compare
This PR allows you to get a repeated warning when flying outside FENCE_MARGIN but inside the fence itself. Can be enabled by setting FENCE_OPTIONS=4. Multiple people have requested this because they are required to have a hard fence with failsafe action for regulatory reasons but want to know when they are close so they can avoid the action (typically when flying manually)