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

feat: ELRS bind command support #4907

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

feat: ELRS bind command support #4907

wants to merge 25 commits into from

Conversation

3djc
Copy link
Collaborator

@3djc 3djc commented Apr 22, 2024

This PR brings support to CRSF bind and ping frames.

  • you can now easily loan model using Bind and Unbind buttons from Model Setup screen without using the ELRS LUA script. Please note that those buttons will only appears on ELRS module that run ELRS 3.4 or later

image

image

  • module version screen (under SYS//Info) now show much more info on ELRS modules

image

image

  • also add module info to radio without pxx2

Fixes #4906

@raphaelcoeffic
Copy link
Member

@3djc this will need support for color LCD as well, right?

@3djc
Copy link
Collaborator Author

3djc commented Apr 23, 2024

@3djc this will need support for color LCD as well, right?

@raphaelcoeffic Should be working on colorlcd

@3djc
Copy link
Collaborator Author

3djc commented Apr 23, 2024

Tested successfully on TX16S using RM Ranger and RM ER6, so colorlcd is fine as I said :)

I'm thinking about adding one cheerp audio feedback, as since only one frame is sent, the regular binding sound is not heard. Maybe one play of it is more in line with what a user would expect

@3djc
Copy link
Collaborator Author

3djc commented Apr 23, 2024

Added detection of streaming receiver, in which case bind button is turned to unbind (and frame is then sent to receiver for it to go in bind mode instead of radio module)

Added audio feedback

@CapnBry
Copy link
Contributor

CapnBry commented Apr 23, 2024

This flippin works so good I love it (tried colorlcd and bw128x64). So easy without digging into multiple layers of lua.

Someone needs to test this on Crossfire though, because I think their bind procedure is backwards from ours? It has been several years since I've used it but I think the TX goes into bind mode continuously and then the RX completes the bind (where ours the RX is continuous and the TX completes it).

I'm not sure if their TX handles the bind command or if they only implemented the RX side too.

@3djc 3djc marked this pull request as draft April 23, 2024 14:30
@3djc
Copy link
Collaborator Author

3djc commented Apr 23, 2024

Have more polish to add to this so th Captain doesn't get alarmed :D

@3djc 3djc marked this pull request as ready for review April 24, 2024 09:21
@3djc
Copy link
Collaborator Author

3djc commented Apr 24, 2024

This flippin works so good I love it (tried colorlcd and bw128x64). So easy without digging into multiple layers of lua.

Someone needs to test this on Crossfire though, because I think their bind procedure is backwards from ours? It has been several years since I've used it but I think the TX goes into bind mode continuously and then the RX completes the bind (where ours the RX is continuous and the TX completes it).

I'm not sure if their TX handles the bind command or if they only implemented the RX side too.

This feature is now available only to ELRS modules (version >= 3.4), not Crossfire :)

@CapnBry
Copy link
Contributor

CapnBry commented Apr 24, 2024

Tested on TX16S (colorlcd) / T14 (128x64 but no module version page) / Boxer (128x64), and my long laundry list of concerns / issues (on Discord) have been addressed by this fabulous PR. Thanks so much, what a wonderful ease-of-use feature for binding or sharing a model with a friend, something I see a lot a races.

There's the issue of the user hitting Unbind in flight, which will disconnect the receiver. This is recoverable by simply rebinding, which occurs at the 50Hz (longest range) packet rate so it should not be an issue. I can also set the module type to OFF or change the receiver number in flight so I consider this to be of roughly the same risk level: None*

@rotorman
Copy link
Member

rotorman commented Apr 24, 2024

To avoid unbinding during flight, could also check the arming state? If armed, do not allow to unbind (if we know the module is ExpressLRS module, then at least the ExpressLRS Lua is able to fetch the state of ExpressLRS RF "armed" or not. Thus EdgeTX should be able to get this info out of the module as well. Although RF armed state might not 100% correlate to the model arming state, if on the model side further checks are done or another channel is used for arming, nevertheless this could be a step towards eliminating users not unbinding during flight).

@3djc
Copy link
Collaborator Author

3djc commented Apr 24, 2024

A lot of complications for an illusion of safety imho

@raphaelcoeffic
Copy link
Member

A lot of complications for an illusion of safety imho

We've had the possibility of enabling "Bind" on the radio for basically all modules regardless of telemetry status, without anyone complaining about it.

@CapnBry
Copy link
Contributor

CapnBry commented Apr 24, 2024

To avoid unbinding during flight, could also check the arming state?

No new functionality will ever be tied to Armed state, as many users are unaware of "Arming" via CH5 and are using as a general purpose channel.

Also, if the user is 3 menus deep in their model settings changing the active transmitter module while flying and hits UNBIND... just press it again to re-bind. They weren't actively controlling the model anyway so all illusion of "safety" was already out the window. 😆

@3djc
Copy link
Collaborator Author

3djc commented Apr 26, 2024

We need "something" to indicate loss of signal, not sure RF Signal critical is worse than anything else

@CapnBry
Copy link
Contributor

CapnBry commented Apr 26, 2024

Oh for sure, 100% agree. The telemetry lost / telemetry recovered is a great indicator. The "RF Signal Critical" just doesn't need to be there, but that's because its coming from ExpressLRS and EdgeTX is doing the correct thing when we report it.

@pfeerick
Copy link
Member

pfeerick commented Apr 27, 2024 via email

@3djc
Copy link
Collaborator Author

3djc commented Apr 27, 2024

100% agreed

@pfeerick pfeerick added the enhancement ✨ New feature or request label Apr 28, 2024
@pfeerick pfeerick added this to the 2.11 milestone Apr 28, 2024
@pfeerick pfeerick added needs:translation rn: feature Feature to be highlighted in release notes labels Apr 28, 2024
@pfeerick
Copy link
Member

pfeerick commented May 5, 2024

Can we get some translations for this please 🙏

With ELRS, this will change to Unbind once bound:
image
image

#define TR_MODULE_UNBIND               BUTTON("Unbind")

radio/src/gui/gui_common.cpp Outdated Show resolved Hide resolved
radio/src/pulses/modules_helpers.h Outdated Show resolved Hide resolved
@zandorsp
Copy link
Contributor

zandorsp commented May 5, 2024

PT
#define TR_MODULE_UNBIND BUTTON("Unbind")

(There is no good translation)

@ToshihiroMakuuchi
Copy link
Contributor

JP
#define TR_MODULE_UNBIND BUTTON("バインド解除")

@ajjjjjjjj
Copy link
Contributor

PL

#define TR_MODULE_UNBIND BUTTON("Unbind")

(same story as with PT)

@ParkerEde
Copy link
Contributor

DE
#define TR_MODULE_UNBIND BUTTON("Trennen")

@HThuren
Copy link
Contributor

HThuren commented May 5, 2024

DA
#define TR_MODULE_UNBIND BUTTON("Afkobl")

@robustini
Copy link
Contributor

robustini commented May 5, 2024

IT
#define TR_MODULE_UNBIND BUTTON("Unbind")

(There is no good translation at the moment, I have to do more checking because in IT there are some BIND and some ASSOCIA)

@Pat6874
Copy link
Contributor

Pat6874 commented May 5, 2024 via email

@Eldenroot
Copy link
Contributor

CZ:

#define TR_MODULE_UNBIND BUTTON("Odpárovat")

@ulfhedlund
Copy link
Contributor

SE:
#define TR_MODULE_UNBIND BUTTON("Glöm")

@kobakirill
Copy link
Contributor

kobakirill commented May 7, 2024

RU
#define TR_MODULE_UNBIND BUTTON("Unbind")

(There is no good translation)

@zyren
Copy link
Contributor

zyren commented May 9, 2024

CN

#define TR_MODULE_UNBIND               BUTTON("解绑")

TW

#define TR_MODULE_UNBIND               BUTTON("解綁")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request rn: feature Feature to be highlighted in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ELRS universal binding