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

Add and use new ModeReason::AUX_FUNCTION #27271

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Jun 7, 2024

Aux function are no longer only from RC. This changes to use a dedicated mode reason.

We don't check for the old ModeReason::RC_COMMAND anywhere in the main code. Nor is it exposed over MAVLink. There is a scripting binding, and it is used in logging.

The scripting binding is vehicle:get_control_mode_reason(), it is not used by any of our examples.

@peterbarker
Copy link
Contributor

@IamPete1 we could, perhaps, have multiple AUX_FUNCTION enumeration entries, and choose a different one based on AuxFuncTriggerSource - as you say, there are many ways we can trigger aux functions now-adays.

@IamPete1
Copy link
Member Author

IamPete1 commented Jun 8, 2024

@IamPete1 we could, perhaps, have multiple AUX_FUNCTION enumeration entries, and choose a different one based on AuxFuncTriggerSource - as you say, there are many ways we can trigger aux functions now-adays.

We also have AUXF log, so this mode reason should be enough to tell you to go and look at the AUXF where the source is logged.

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this solution or PeterB's suggestion.

@peterbarker peterbarker merged commit bd17d4d into ArduPilot:master Jun 17, 2024
92 checks passed
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.

5 participants