-
Notifications
You must be signed in to change notification settings - Fork 16.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
Copter: ModeGuided: add an option_is_enabled method, use it #27141
Copter: ModeGuided: add an option_is_enabled method, use it #27141
Conversation
Added a test for one of the options, others done my inspection only |
ArduCopter/mode_guided.cpp
Outdated
@@ -1009,7 +1014,7 @@ void ModeGuided::set_yaw_state(bool use_yaw, float yaw_cd, bool use_yaw_rate, fl | |||
// returns true if pilot's yaw input should be used to adjust vehicle's heading | |||
bool ModeGuided::use_pilot_yaw(void) const | |||
{ | |||
return (copter.g2.guided_options.get() & uint32_t(Options::IgnorePilotYaw)) == 0; | |||
return option_is_enabled(Option::IgnorePilotYaw); |
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.
return option_is_enabled(Option::IgnorePilotYaw); | |
return !option_is_enabled(Option::IgnorePilotYaw); |
9efeecb
to
515aa80
Compare
feel free to merge after those couple of small fixes. |
515aa80
to
bebecf4
Compare
bebecf4
to
60895d1
Compare
I've confirmed that using the |
No description provided.