-
Notifications
You must be signed in to change notification settings - Fork 30
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 support for extended CRSF RF Modes #39
Conversation
couldn't you just make the assumption that anything over 2 is going to be ELRS? saves user error... also, what happens if it's set to ELRS but the user is using TBS? |
Good question! RFMode 1/2 have different interpretations for Crossfire & ExpressLRS - 1/2 are 50/150Hz vs 25/50Hz respectively. If a user has the config set to ELRS and the user is using Crossfire, they get 25/50 displayed instead of 50/150. |
i see what you mean, i wonder if there's any way you could read the board type via lua, kinda like the agent-lite lua does, should only need to be done once on bootup. would have been nice if the elrs guys matched the current crossfire spec, but hey, i'm not going to get into politics here lol |
Yeah, I was thinking the same - it'd require some significant work and code outside of the existing framework of the widget (telemetry value focused). The ExpressLRS LUA does this, but I didn't want to break too far out of the mold / design. |
well one thing you COULD do is maybe call the elrs script functions in the inav lua maybe? I know it's getting it more complicated, and a simple config value would fix it simply. but i was just trying to head off someone saying "hey my lua says on 150 hz but i'm running elrs at 500... what gives" LOL |
I was able to make this work - sorta. I'm wrestling with how to get the check to work reliably on boot since
|
Late evening inspiration got me. This approach polls in There are a few more things I'd like to shore up before merging: handling error cases, validating non-CRSF behavior, etc. |
It is necessary to do the busy-wait each |
Thanks, good note! I've moved |
Approved GitHub CI Checks, seems to be building just fine |
I tested the previous commit on the Edge/2.7 simulator without any problems. I'll test current on TX16S/MPM tomorrow. |
And there are no issues on TX16S/MPM or simulator. |
A new iteration - this one works reliably in all cases for me and reduces the number & location of retries down to the minimum that still works. |
When using ExpressLRS, the packet rate in the top-right of the telemetry widget is inaccurate, and shows 50Hz while operating at packet rates with RF Mode > 2. This change introduces a new configuration item, which when set to "ExpressLRS", supports RFModes up to 8 (1000Hz), and correctly displays rates for ExpressLRS systems.
Translations are still needed, but otherwise is functional.