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

AP_RCTelemetry: throttle CRSF request RX device info messages #25494

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

olliw42
Copy link
Contributor

@olliw42 olliw42 commented Nov 8, 2023

I'm not sure you'll like it, but I like it a lot and hence dare to suggest:

There are situations in which one wants to use CRSF, but only with one wire (receiver Tx -> ardupilot Rx), without the additional telemetry wire (receiver Rx <- ardupilot Tx). Examples would be companions or third-party receivers. In such cases the RCTelemetry library sends 50 statustest messages at 2 Hz rate, i.e., for a total of 25 seconds, before it concludes it can stop requesting a CRSF message. The PR here throttles the sending of these statustext messages to one every 5 seconds, which should be really sufficient to have the full attention of the user.

Alternatives: One could add an option which either supresses sending these messages (similar to RC_Channels::Option::SUPPRESS_CRSF_MESSAGE) or which disables the requesting. I think the simple throttling is preferable since it doesn't need user interactions nor any documentation.

The code change has been massively tested for a long while on a copter.

Behavior before this PR:

crsfping-before

Behavior after this PR:

crsfping-after

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

This can also happen even if you have two wires connected with ELRS.

@tridge tridge merged commit 61aec54 into ArduPilot:master Nov 13, 2023
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.

4 participants