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: remove global ap.new_radio_frame state #28355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

we have better means to determine if you have valid input

Rebase/push after #28354 is merged - in the meantime only the most recent patch is interesting

we have better means to determine if you have valid input
@peterbarker peterbarker force-pushed the pr/remove-new-radio-frame-state branch from 921a778 to b0c800f Compare November 8, 2024 01:18
// mark radio frame as consumed
ap.new_radio_frame = false;
// exit immediately if RC input is invalid:
if (!rc().has_valid_input()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not the same; RC input would come in at maybe 50Hz, this method is called at the main loop rate, so we'd start to do these transforms much faster than required in the case someone's using simple mode. The method is also not idempotent, so pretty much completely broken.

We probably want to unconditionally call this method when a new radio frame is received instead.

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.

1 participant