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

Copter: Grouping judgment conditions #26875

Closed

Conversation

muramura
Copy link
Contributor

Multiple IF statements contain the same decision condition.
I have grouped the judgment conditions.

Copy link
Contributor

@lthall lthall left a comment

Choose a reason for hiding this comment

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

I like it but I would like to see the following line split out by removing the internal decision statement.
auto_yaw.set_yaw_angle_rate(yaw_cd * 0.01f, use_yaw_rate ? yaw_rate_cds * 0.01f : 0.0f);

@muramura muramura force-pushed the AP_Grouping_judgment_conditions branch from 65f2313 to 6fb655e Compare April 24, 2024 20:57
@muramura
Copy link
Contributor Author

@lthall san.
Thanks for the review.
I have made the changes.

@lthall
Copy link
Contributor

lthall commented Aug 12, 2024

Sorry for the delay. Do you want to do a quick rebase and I will try to get it approved at the next dev call.

@peterbarker
Copy link
Contributor

I'm not a great fan of this, but marking I've rebased it and I'm marking for DevCall.

Copy link
Contributor

@lthall lthall 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

@rmackay9
Copy link
Contributor

It's correct but I think it's less easy to understand after the change. I think with two of us not liking the change I think I'll close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants