Skip to content
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

Merged
merged 4 commits into from
Mar 27, 2024
Merged

Conversation

hamishwillee
Copy link
Collaborator

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:

  • mission settings persist in the mission context, even on flight stacks that pause by switching mode to "Hold": on return to the mission the mission setting would be used.
  • As a command the value only persists until mode change or reboot.
  • A command can affect a mission

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.

Copy link
Contributor

@sfuhrer sfuhrer left a 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.

@hamishwillee
Copy link
Collaborator Author

Thanks @sfuhrer !

@peterbarker Does this work for you too?

message_definitions/v1.0/common.xml Outdated Show resolved Hide resolved
message_definitions/v1.0/common.xml Outdated Show resolved Hide resolved
message_definitions/v1.0/common.xml Outdated Show resolved Hide resolved
@peterbarker
Copy link
Contributor

peterbarker commented Mar 21, 2024 via email

@hamishwillee
Copy link
Collaborator Author

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?

@peterbarker
Copy link
Contributor

peterbarker commented Mar 21, 2024 via email

@hamishwillee
Copy link
Collaborator Author

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.

@hamishwillee hamishwillee merged commit 4e5d6a2 into master Mar 27, 2024
13 checks passed
@hamishwillee hamishwillee deleted the hamishwillee-patch-12 branch March 27, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants