-
Notifications
You must be signed in to change notification settings - Fork 18k
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 not allow users to set throttle-based notch in Heli #28843
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.
LGTM, just would like to see the types called out explicitly
ea5a4ea
to
c0c5fe9
Compare
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.
@MattKear Thanks for this PR. LGTM
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.
LGTM
// Throttle tracking does not make sense with heli because "throttle" is actually collective position in AP_MotorsHeli | ||
for (auto ¬ch : harmonic_notches) { | ||
if (notch.params.enabled() && notch.params.tracking_mode() == HarmonicNotchDynamicMode::UpdateThrottle) { | ||
AP_BoardConfig::config_error("Throttle notch unavailable with heli"); |
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.
Upon further though, I think it might have been better if this had been made an arming check. With a config_error the main loop won't run and the user will find the HUD doesn't update. Sadly this will only happen the next time that they reboot the board so they may not remember that they changed the harmonic notch method
My attempt at fixing issue: #28841
Throttle is not "Throttle" in AP_MotorsHeli, it is actually collective position. Therefore, throttle-based tracking does not make any sense for Heli.
This is a subtly that most users will not appreciate, therefore we should help users to not make this mistake by throwing a config error if selected.
Have also changed the default notch mode for heli.
Tested in SITL only. This is how it presents to the user upon miss-configuration: