Skip to content

Add lvgl bindphrase setting script#10

Open
CapnBry wants to merge 124 commits into
ExpressLRS:masterfrom
CapnBry:bindphrase
Open

Add lvgl bindphrase setting script#10
CapnBry wants to merge 124 commits into
ExpressLRS:masterfrom
CapnBry:bindphrase

Conversation

@CapnBry

@CapnBry CapnBry commented Jun 26, 2026

Copy link
Copy Markdown
Member
image

For ExpressLRS 4.1, a utility to set a bindphrase. Builds on #3

There is a history saved to "elrs-phrase.txt" that shows last 5 as buttons the user can click to set the bindphrase to that but holy smokes if after 3 hours I could not get it to work. There's no way to set a textEdit's value?! Deleting it and recreating it lets me update it, but then the button just doesn't do anything. No error. Nothing. 🤷 Whatever EDIT: I sort of hamfisted got it working

RX Binding Functions

If there is no RX connected and the user selects the "Receiver" target, the user is presented with instructions and a Bind button. If an RX is connected when receiver is selected, an "Unbind" button is added to allow them to disconnect it and allow it to bind to someone else. Image below.

Zip file for users who want to use this now

Includes this entire repo with Jurg's scripts as well, unzip to the root of your SD card

elrs-bind-v3.zip

@CapnBry

CapnBry commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

I realize now I forgot to push the changes. Now they're there, and the bind phrase history is as well.

@CapnBry

CapnBry commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Oh stylua and I gonna fight. There's no way I am complying with their "you can't say if not x then return end" rule without a very good reason

@CapnBry

CapnBry commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

People on seeing this feature seem to think that it should be able to send a bindphrase to an RX that isn't bound, but we can't because send data to it. If this is the case, I've added a bind shortcut button to allow a bind to happen. Also there is an "Unbind" button added if the user wants to put the RX into binding mode when if it is connected.

image

@CapnBry

CapnBry commented Jul 6, 2026

Copy link
Copy Markdown
Member Author
  • Renamed to "ELRS Bind Manager". Please delete elrs-phrase.lua, elrs-phrase.luac, and rename your elrs-phrase.txt to elrs-bind.txt after updating with v2 zip in first post.
  • Updated to scale properly with LCD size

@CapnBry

CapnBry commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

The language server test is dead wrong and it can fuck right off. I will now fight to have this check removed from check process. 😠

@robschii

robschii commented Jul 9, 2026

Copy link
Copy Markdown

not working with edgtx 2.12.2!

@CapnBry

CapnBry commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

not working with edgtx 2.12.2!

Which is the only version of EdgeTX I've tested it with! Maybe you can provide some other information about your setup? Handset, ELRS version, ELRS module type? Note that this only works on ELRS 4.1.0-RC1 currently.

@bartoszp1992 bartoszp1992 mentioned this pull request Jul 18, 2026
@Larryvoll

Copy link
Copy Markdown

JUst a lil FYI, The GX12 has a 128×64 monochrome OLED, not a color touchscreen. LVGL-based Lua scripts (buttons, sliders, text fields, the whole "bind v2" UI style) were built specifically for EdgeTX's color-screen radios — EdgeTX 2.11 added that LVGL API, but only for the color-LCD firmware build. On the monochrome/B&W build (which is what your GX12 runs, even at 2.12.1), the lvgl object is never populated at all — it's compiled out, not "an older version." The script can't tell the difference between "firmware too old" and "hardware doesn't have LVGL," so it throws the same generic "2.11+ required" message either way.
Bottom line: no firmware upgrade will get this specific script working on the GX12. It's a hardware limitation, not a version mismatch. Probably true for all mono screens?

@charlybrown1982

Copy link
Copy Markdown

JUst a lil FYI, The GX12 has a 128×64 monochrome OLED, not a color touchscreen. LVGL-based Lua scripts (buttons, sliders, text fields, the whole "bind v2" UI style) were built specifically for EdgeTX's color-screen radios — EdgeTX 2.11 added that LVGL API, but only for the color-LCD firmware build. On the monochrome/B&W build (which is what your GX12 runs, even at 2.12.1), the lvgl object is never populated at all — it's compiled out, not "an older version." The script can't tell the difference between "firmware too old" and "hardware doesn't have LVGL," so it throws the same generic "2.11+ required" message either way. Bottom line: no firmware upgrade will get this specific script working on the GX12. It's a hardware limitation, not a version mismatch. Probably true for all mono screens?

Yes, I found the same issue with the Radiomaster Pocket.

@Ivan125976

Copy link
Copy Markdown

Hello! When launching on a Radiomaster Boxer running EdgeTX 2.11.6, a message appears at the top: "LVGL (EdgeTX 2.11+) requir...". The rest of the message extends off the screen.

@CapnBry

CapnBry commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Updated

  • Added X to delete items from the History list
  • Added "Both" target to set both the RX and TX at the same time
  • Moved script to folder instead of at the root, allows for a ui subfolder and then the ability to render a B&W ui, however crippled that will be
  • elrs-bind.txt (the saved history) renamed to history.txt

Updating

If you already have this installed, you'll need to delete the elrs-bind.lua, elrs-bind.luac, and move elrs-bind.txt to elrs-bind/history.txt if you want to preserve your history. Otherwise just delete elrs-bind.txt to let the new location start a new history.

@CapnBry

CapnBry commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Hello! When launching on a Radiomaster Boxer running EdgeTX 2.11.6, a message appears at the top: "LVGL (EdgeTX 2.11+) requir...". The rest of the message extends off the screen.

Hello and thanks for reporting this, but this should be reported in #3 as that's the base that displays this message and this builds on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants