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

Commander: avoid RC actions during calibration #18890

Merged
merged 1 commit into from Dec 22, 2021
Merged

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Dec 22, 2021

Describe problem solved by this pull request
Before #17404 special handling of RC actions namely arming, modes switching and override during RC calibration was done through the ManualControl::setRCAllowed() in the class within commander. Listening to the vehicle_status_flags.rc_input_blocked flag was kept intact for the override but not for arming and mode switching.

Describe your solution
I rename the flag vehicle_status_flags.rc_input_blocked to rc_calibration_in_progress to avoid any ambiguity and guard the execution of RC-initiated actions during RC calibration.

Test data / coverage
I bench tested this on a pixracer with TBS Crossfire SBUS concentrating on holding the already calibrated arm gesture for a long time and also moving the already configured mode switch during calibration because that's what triggered the actions before.

Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

Nice! That looks correct.

@dagar dagar merged commit f68ae39 into master Dec 22, 2021
@dagar dagar deleted the fix-arm-rc-calibration branch December 22, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants