Skip to content

lua: LVGL touch UI variant of the configurator (draft) - #472

Open
burzl89 wants to merge 2 commits into
olliw42:mainfrom
burzl89:lua-lvgl-touch
Open

lua: LVGL touch UI variant of the configurator (draft)#472
burzl89 wants to merge 2 commits into
olliw42:mainfrom
burzl89:lua-lvgl-touch

Conversation

@burzl89

@burzl89 burzl89 commented Jul 6, 2026

Copy link
Copy Markdown

Following up on the Discord discussion — this adds lua/mLRS-lvgl.lua, an LVGL-based touch UI variant of the configurator, alongside the unchanged classic mLRS.lua.

This corresponds to the v1.0.0 release in my staging repo, where I keep more detailed release notes and test status while this settles.

What it does

  • Full LVGL widget UI (EdgeTX 2.11+): everything touch-operated
  • Native on-screen keyboard for the bind phrase and STR6 params, input sanitized to the mLRS charset
  • Native popup pickers for Mode / RF Band / Ortho and all list params; options outside the allowed_mask are filtered out
  • numberEdit with min/max/unit for numeric params, scrollable Edit Tx/Rx pages
  • Reactive attributes instead of manual redraws; the LVGL tree is only rebuilt on page/data changes
  • Two switchable color themes (Tools page, persisted on the SD card): the dark style from the screenshots plus a high-contrast theme — added after Olli's feedback about sunlight readability and older eyes
  • Layouts: 800x480, 480x272 and 480x320 — all three confirmed on real hardware, themes included
  • The mBridge/CRSF protocol section is byte-identical to the classic script (aligned after Olli's maintainability feedback)
  • Radios without LVGL show a hint to use the classic script instead

Status

  • Confirmed working on real hardware: 800x480 (TX16S MK3), 480x272 (original TX16S), and 480x320 — all three including the theme switcher
  • Portrait radios (NV14/EL18) intentionally not supported yet

Draft on purpose — happy to align with #448 (thanks @jlpoltrack for the groundwork and the blessing to build on it) and with Olli's own WIP version. Colors, defaults and file naming are all open for discussion.

burzl89 and others added 2 commits July 6, 2026 15:48
Adds lua/mLRS-lvgl.lua alongside the classic mLRS.lua: a full LVGL
widget UI for EdgeTX 2.11+ color touch radios. Everything is touch
operated; the bind phrase uses the native on-screen keyboard (input
sanitized to the mLRS charset), Mode/RF Band/Ortho and all list
parameters use native popup pickers with allowed_mask filtering,
numeric parameters use numberEdit with min/max/unit, and the Edit
Tx/Rx pages are scrollable lists. The UI uses reactive attributes;
the LVGL tree is only rebuilt on page or data changes.

Two switchable color themes (dark and high contrast, persisted on
the SD card) and three layouts: 800x480 (TX16S MK3, confirmed on
hardware), plus compact 480x272 and 480x320 variants (not yet
hardware-tested). The mBridge/CRSF protocol section is identical to
the classic script; radios without LVGL get a hint to use it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per Olli's PR feedback: keep the LVGL and classic scripts as close
as possible for easier maintenance. The mBridge/CRSF/parameter
backend now diffs identically against lua/mLRS.lua; only the popup
rendering differs (LVGL reactive widgets vs lcd.draw* calls), which
is inherent to the two UI approaches.
@burzl89

burzl89 commented Jul 6, 2026

Copy link
Copy Markdown
Author

Thanks for the look, and fair point re: AI-generated architecture drift — I went back and aligned the whole mBridge/CRSF/parameter-handling backend so it now diffs identically against lua/mLRS.lua (down to the comments, including a couple of dead-but-harmless helper functions I had trimmed). The only remaining difference is the popup rendering, which is inherent to the two approaches (LVGL reactive widgets vs. lcd.draw* calls) — everything else should patch cleanly across both files now.

Still waiting on a 480x272 test on a real (non-MK3) TX16S, hopefully within the week. No pressure on timing from my side — happy to align with whatever direction you and JLP's work end up taking.

@burzl89

burzl89 commented Jul 6, 2026

Copy link
Copy Markdown
Author

Update: 480x272 has now been confirmed working on a real original TX16S (second tester, different radio than mine). So at this point both 800x480 (MK3) and 480x272 are hardware-verified, including the theme switcher. 480x320 shares the same compact layout code path as 480x272 (just a bit more vertical space) but hasn't been independently tested.

Tagged as v1.0.0-rc3 in my staging repo: https://github.com/burzl89/mlrs-lua-mk3/releases/tag/v1.0.0-rc3

@burzl89

burzl89 commented Jul 6, 2026

Copy link
Copy Markdown
Author

Update: 480x320 has now also been confirmed working, so all three supported screen classes (800x480 MK3, 480x272, 480x320) are hardware-verified, themes included. Tagged this as a stable v1.0.0 in my staging repo rather than another RC: https://github.com/burzl89/mlrs-lua-mk3/releases/tag/v1.0.0

Still a draft here of course — whatever makes sense once you've had a chance to look, combine with your own version, or just take pieces of it.

@burzl89
burzl89 marked this pull request as ready for review July 6, 2026 19:35
@burzl89

burzl89 commented Jul 6, 2026

Copy link
Copy Markdown
Author

Marked this as ready for review now that all three screen classes are hardware-confirmed. No pressure on the outcome though — happy to have pieces of it folded into whatever you and JLP end up converging on.

@jlpoltrack jlpoltrack mentioned this pull request Jul 13, 2026
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.

1 participant