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

Split sending of RC_CHANNELS and RC_CHANNELS_RAW #11735

Merged
merged 6 commits into from Jul 9, 2019

Conversation

peterbarker
Copy link
Contributor

Before this patch is applied we may never send the second message
because there's not room for it in the buffer and we can't return
failure-to-send (always interpreted as "retry") as we're in a void function.

Further, if you are on a mavlink2 connection we will not send out the
RC_CHANNELS_RAW message, depriving the user of any RC_CHANNELS messages.

This patch does have the drawback of doing more work on a mavlink1
connection - it has to fetch the data twice.  On the other hand, it also
allows the GCS to set the message rates independently for both
RC_CHANNELS and RC_CHANNELS_RAW so one or the other can be squelched.
That could be handy for reducing bandwidth if you know you're not using
more than 8 input channels.

Before this patch is applied we may never send the second message
because there's not room for it in the buffer and we can't return
failure-to-send (always interpreted as "retry") as we're in a void function.

Further, if you are on a mavlink2 connection we will not send out the
RC_CHANNELS_RAW message, depriving the user of any RC_CHANNELS messages.

This patch does have the drawback of doing more work on a mavlink1
connection - it has to fetch the data twice.  On the other hand, it also
allows the GCS to set the message rates independently for both
RC_CHANNELS and RC_CHANNELS_RAW so one or the other can be squelched.
That could be handy for reducing bandwidth if you know you're not using
more than 8 input channels.
@tridge
Copy link
Contributor

tridge commented Jul 8, 2019

I'd like to reproduce the issue we hit that triggered this work so we can confirm it is fixed

@tridge
Copy link
Contributor

tridge commented Jul 9, 2019

i've reproduced, and this PR does fix it

@tridge tridge merged commit 0af3ecc into ArduPilot:master Jul 9, 2019
@peterbarker peterbarker deleted the pr/rc-channels-fix branch July 9, 2019 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants