Backport #2931 "Split RC data sending from polling and queued data sending" #2949
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.
By splitting the RC data send and the polling/queued data sending this allows us to limit the packet rate independently of all the other packet data that needs to be sent in a timely manner.
This is particularly useful for the MavLINK serial receiver code where we want to limit the number of RC packets to 250Hz but keep the OTA packet rate at say 1000Hz. This PR does NOT do this, it just enables it by the separation of the code paths.
To limit the RC rate we just need to return an interval from the
sendRCFramefunction in the serial handler rather than the currentDURATION_IMMEDIATELY.This PR also includes rate limiter on the RC data packets for MavLINK to 100Hz so as not to swamp the link.