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

Add CMS support on TX for ELRS #12308

Merged
merged 2 commits into from Feb 21, 2023
Merged

Conversation

SteveCEvans
Copy link
Member

This PR throttles the sending of chunks of DisplayPort data to one every 75ms to prevent overrun on ELRS telemetry channel. Tested at 1:2 to 1:128 Telem Ratios at 500Hz.

Note that this only works at 333Hz and above or D250 and above. Slow update rates don't have the telemetry bandwidth required, but surprisingly telemetry ratio has no apparent impact.

@AlessandroAU if there is a better way to apply flow control to the telemetry channel than this 75ms delay, please let me know.

@SteveCEvans SteveCEvans self-assigned this Feb 5, 2023
@github-actions

This comment has been minimized.

@howels
Copy link
Contributor

howels commented Feb 5, 2023

Telemetry ratio doesn't have an impact cos the telemetry rate automatically switches into 1:2 when encapsulated MSP is sent

@blckmn
Copy link
Member

blckmn commented Feb 5, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> FAIL
  • assigned to an approver -> PASS
  • approver count at least three -> FAIL

@haslinghuis haslinghuis added this to the 4.5 milestone Feb 5, 2023
@SteveCEvans
Copy link
Member Author

Telemetry ratio is set to 1:2 for MSP and CMS traffic, which explains why it had no impact.

Now sends a CRSF ping to the RX and checks the returned device info to identify ELRS receivers and only adds DisplayPort chunk delay if necessary.

@github-actions

This comment has been minimized.

@SteveCEvans
Copy link
Member Author

Need to fix the unit tests…

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

src/main/telemetry/crsf.c Outdated Show resolved Hide resolved
src/main/telemetry/crsf.c Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

src/main/telemetry/crsf.c Outdated Show resolved Hide resolved
@howels
Copy link
Contributor

howels commented Feb 10, 2023

Tested and working on MatekH743 with BetaFPV eLRS Nano RX @500hz and EdgeTX 2.8 on Jumper T-Lite

Failed to work on JHEH743AIO board, flashed twice but no USB connection afterwards. Flashed master and all worked again.

@github-actions

This comment has been minimized.

@haslinghuis
Copy link
Member

@SteveCEvans some builds are failing (probably fixed if we merge #12394 and rebuild

@github-actions
Copy link

Do you want to test this code? Here you have an automated build:
Assets
WARNING: It may be unstable. Use only for testing! See: https://www.youtube.com/watch?v=I1uN9CN30gw for instructions for unified targets!

@haslinghuis haslinghuis merged commit a7e4bf4 into betaflight:master Feb 21, 2023
davidbitton pushed a commit to davidbitton/betaflight that referenced this pull request Feb 5, 2024
* Never block use of SWD pins

* Throttle CMS displayport traffic on CRSF to prevent ELRS overrun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

None yet

5 participants