Repository navigation
New LUA scripts & widgets - #3
Merged
Merged
Conversation
Raise the Bind tool's UID read retries to 12
Member
Member
Member
Author
@CapnBry I have removed a huge chunk of verbose comments. I have also fixed how the layout width is being calculated, but that has dropped the sensitivity floor. |
The next CMD_QUERY is armed with now + (command.timeout or 100). 0 is truthy in Lua, so a device that sends timeout 0 is polled on every tick. The answer to CLICK re-arms the poll at now + 0, overriding the response timeout execCommand set, and the POLL can reach the device before its CONFIRMATION_NEEDED is back. The device answers READY and the confirm dialog never shows (#16). Treat 0 like a missing timeout and poll once per second. Co-authored-by: Itay Sharoni <110981018+Itay-Sharoni@users.noreply.github.com>
Modules older than 3.5.4 predate the spec-compliant folders of ExpressLRS#3123 that the parameter loader relies on; the tool sat on the loading screen forever (#11). DEVICE_INFO already carries the firmware version, so a TX below 3.5.4 latches session.unsupported, the same flag ELRS 1.x detection now sets. run() checks it before tick(), so nothing more is sent to a module the tool cannot browse. The alert just states the minimum. The CRSF mock reports 4.1.0; the new old_firmware scenario reports 3.4.2. Co-authored-by: Itay Sharoni <110981018+Itay-Sharoni@users.noreply.github.com>
Bind tool: on screens narrower than 400px each title gets its own line with the controls under it, so the phrase field and Request UID fit. The no-receiver notice and the history follow the rows in the column instead of sitting at a fixed y offset sized for one-line rows. VTX Admin: the portrait label column is too narrow for hints, so they run full width under their row there. The Collection hint is now a regular row hint like the others. Fixes #32
A device that runs a command immediately may answer START with READY and an info text such as "OK" or "Failed" (see the TBS CRSF spec command sequence). The session dropped the command on READY and both UIs closed their popup, so the text was never seen. The session keeps a finished command's closing text in commandResult. Colour radios show it in a new Dialogs.showInfo dialog with a Close button, opened after the page rebuild so lvgl.clear() does not drop it. B&W radios show it in a popup closed by ENTER or EXIT. ELRS finishes commands with an empty info, so its commands are unchanged. The CRSF simulator RX gets a Reset Stats command that finishes at once with "OK". Fixes #17
…sult-info # Conflicts: # src/SCRIPTS/CRSFSimulator/csrfsimulator.lua
showInfo and buildExitDialog built the same dialog, differing only in height and button label. Both now go through one buildDialog with a Close button and the default height; buildExitDialog keeps the lvgl.clear() before it. The Dialogs functions take positional arguments instead of an options table, so their signatures say what they need. showConfirm drops onCancel, which no caller passed. The CRSF simulator TX advertises 25 fields again; Reset Stats is an RX field only.
The widget applied the 6POS boot position to the module once discovery finished, assuming customizable switches restore their previous position. Since EdgeTX 2.12.0 new models start SW1 on and SW2-SW6 off, and the analog 6POS (TX16S Mk2, V16) always boots on position 1, so every boot rewrote the module's VTX Admin to preset 1 and the module sent it to the VTX on link-up. The first reading from a 6POS source, at boot or after a source change, is now recorded without a write, as the Send VTx trigger already does. Only switch moves and collection changes retune. A move made during discovery is still held until the widget is ready. The lit preset cell follows the module's band and channel rather than the switch, which can disagree after boot. When several presets match, the switch position wins.
Off by default: the module keeps its VTX Admin channel on model load. On: the first 6POS reading applies its preset and pushes it to the VTX, as the link may already be up after a model switch. Useful only where the 6POS remembers its position, e.g. TX16S Mk3 switches set to start at Previous.
EdgeTX 2.12.3 (#7667) reports ANT 1-based; earlier versions 0-based. Latch the base from the first 0 or 2 seen while streaming and keep antennas 1/2 internally; fall back to the stronger RSSI until known. X modes: path 1 is sub-GHz, path 2 is 2.4 GHz; the full-screen rows label them SubG / 2.4. Adds an xband simulator scenario.
…ss-reboots Keep the VTX Admin channel across reboots
…into unified-lua-lsp
The big band/channel used the theme focus colour, the same as the selected 6POS pill below it. Secondary1 matches the title and power text and leaves focus to the selection.
CapnBry
approved these changes
Oct 4, 2026
CapnBry
left a comment
Member
There was a problem hiding this comment.
What a night and day difference from the OG Lua. Thanks for making it all happem. Jurg!
Colour the VTX Admin band/channel like the power label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.