-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
DO_FENCE_ENABLE when sent as a command #2091
Conversation
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.
Looks correct to me. The same way as we have implemented the SET_SPEED from what I see.
Thanks @sfuhrer ! @peterbarker Does this work for you too? |
On Wed, 20 Mar 2024, Hamish Willee wrote:
> + <description>
+ Enable the geofence.
+ This can be used in a mission or via the command protocol.
+ The persistence/lifetime of the setting is undefined.
+ Depending on flight stack implementation it may persist until superseded (even across reboots), or it may revert to a system default at the end of a mission or on reboot.
+ </description>
@peterbarker Work for you now?
About as good as it's going to get ATM :-/
Note that ArduPilot has had some behaviour where non-parameter mavlink
commands have changed persistent state on the vehicle where they
shouldn't. We are cleaning those up as time goes on.
I don't think ArduPilot persists any fence state based on these mavlink
commands, 'though.... we initialise state from parameters but don't store
the state back into those parameters.
|
Oh, I understood from your comment that ArduPilot wrote to a parameter. So you reset on boot too? |
On Thu, 21 Mar 2024, Hamish Willee wrote:
I don't think ArduPilot persists any fence state based on these mavlink commands, 'though.... we initialise state from parameters but don't store the state back into those parameters.
Oh, I understood from your comment that ArduPilot wrote to a parameter. So you reset on boot too?
Net outcome, yes.
Not really a matter of "reset on boot" so much as "at boot the value is
initialised from parameter" and that parameter's not changed by these
commands.
|
Thanks @peterbarker - that's what I understood. I've updated to make it clear that "most flight stacks update on reboot". Going to merge now, as this is hand wavey, but more correct than before. |
The MAV_CMD_DO_FENCE_ENABLE states that it is a mission item, but it can, and is sent as a command. This attempts to clarify the expected behaviour in this case.
The points of interest being that:
Originates from discussion with @andyp1per in ArduPilot#349 (comment)
@sfuhrer @peterbarker Does this makes sense? Is it what is done? That's my assumption on what you'd want to happen but I haven't tested.