AP_RCTelemetry: throttle CRSF request RX device info messages #25494
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Behavior after this PR: