Skip to content

Commit 5f92789

Browse files
committed
raise minimum EdgeTX to 2.11.6 / 2.12.1
Enforce the per-branch minimum at runtime in both LVGL and BW UIs and update the manifest pre-install gate. Drop unreachable lvgl-nil fallback code in ui/lvgl.lua.
1 parent 67c8835 commit 5f92789

5 files changed

Lines changed: 57 additions & 28 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,5 @@ The simulator supports multiple test scenarios, configurable via the `config.sce
123123

124124
| Radio type | Firmware | ExpressLRS |
125125
|------------|----------|------------|
126-
| Black & white LCD | EdgeTX 2.12+ or 3.0+ | v3.0+ |
127-
| Color LCD | EdgeTX 2.12+ or 3.0+ | v3.0+ |
126+
| Black & white LCD | EdgeTX 2.11.6+, 2.12.1+, or 3.0+ | v3.0+ |
127+
| Color LCD | EdgeTX 2.11.6+, 2.12.1+, or 3.0+ | v3.0+ |

edgetx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ package:
2222
- telemetry
2323
license: GPL-3.0-only
2424
source_dir: src
25-
min_edgetx_version: "2.12.0"
25+
min_edgetx_version: "2.11.6"
2626

2727
libraries:
2828
- name: ELRS

src/SCRIPTS/TOOLS/ExpressLRS/main.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
---- # #
66
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
77
---- # #
8-
---- # Unified tool for BW and color LCD radios (EdgeTX 2.12+) #
8+
---- # Unified tool for BW and color LCD radios (EdgeTX 2.11.6+/2.12.1+) #
99
---- #########################################################################
1010

1111
local VERSION = "r2"
@@ -145,9 +145,9 @@ local function run(event, touchState)
145145
return 2
146146
end
147147

148-
-- UI-specific pre-checks (LVGL: version/availability check; BW: not defined)
148+
-- UI-specific pre-checks (version check on both LVGL and BW paths)
149149
if UI.preCheck then
150-
local result = UI.preCheck()
150+
local result = UI.preCheck(event)
151151
if result ~= nil then
152152
return result
153153
end

src/SCRIPTS/TOOLS/ExpressLRS/ui/lcd.lua

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ local Navigation = deps.Navigation
1010
local Protocol = deps.Protocol
1111
local VERSION = deps.VERSION
1212

13+
local VERSION_CHECK_ENABLED = true
14+
local versionCheckResult = nil
15+
16+
local function checkEdgeTxVersion()
17+
local _ver, _radio, maj, minor, rev = getVersion()
18+
19+
if maj >= 3 then
20+
return true
21+
elseif maj == 2 and minor == 12 and rev >= 1 then
22+
return true
23+
elseif maj == 2 and minor == 11 and rev >= 6 then
24+
return true
25+
end
26+
27+
return false
28+
end
29+
1330
-- ============================================================================
1431
-- UI state
1532
-- ============================================================================
@@ -64,6 +81,31 @@ function UI.init()
6481
UI.COL1 = 0
6582
UI.textYoffset = 3
6683
UI.textSize = 8
84+
85+
if VERSION_CHECK_ENABLED then
86+
versionCheckResult = checkEdgeTxVersion()
87+
end
88+
end
89+
90+
-- ============================================================================
91+
-- Interface: preCheck (version gate)
92+
-- ============================================================================
93+
94+
function UI.preCheck(event)
95+
if versionCheckResult == false then
96+
UI.drawAlert("EdgeTX Unsupported", {
97+
"Requires EdgeTX:",
98+
"- 2.11.6 or later",
99+
"- 2.12.1 or later",
100+
"- 3.0 or later",
101+
})
102+
if event == EVT_VIRTUAL_EXIT then
103+
App.shouldExit = true
104+
return 2
105+
end
106+
return 0
107+
end
108+
return nil
67109
end
68110

69111
-- ============================================================================

src/SCRIPTS/TOOLS/ExpressLRS/ui/lvgl.lua

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---- #########################################################################
22
---- # LVGL UI: Color LCD rendering, dialogs, command pages #
3-
---- # For color LCD radios with EdgeTX 2.12+ LVGL support #
3+
---- # For color LCD radios with EdgeTX 2.12.1+ LVGL support #
44
---- #########################################################################
55

66
local deps = ...
@@ -334,11 +334,13 @@ end
334334
local versionCheckResult = nil
335335

336336
local function checkEdgeTxVersion()
337-
local ver, _radio, maj, minor, rev = getVersion()
337+
local _ver, _radio, maj, minor, rev = getVersion()
338338

339339
if maj >= 3 then
340340
return true
341-
elseif maj == 2 and minor >= 12 then
341+
elseif maj == 2 and minor == 12 and rev >= 1 then
342+
return true
343+
elseif maj == 2 and minor == 11 and rev >= 6 then
342344
return true
343345
end
344346

@@ -365,7 +367,8 @@ local function showVersionRequired()
365367
flexPad = lvgl.PAD_SMALL,
366368
children = {
367369
{ type = "label", text = "Requires EdgeTX:" },
368-
{ type = "label", text = "- 2.12 or later" },
370+
{ type = "label", text = "- 2.11.6 or later" },
371+
{ type = "label", text = "- 2.12.1 or later" },
369372
{ type = "label", text = "- 3.0 or later" },
370373
},
371374
},
@@ -389,37 +392,21 @@ local function showVersionRequired()
389392
})
390393
end
391394

392-
local function showLvglRequired()
393-
lcd.clear()
394-
lcd.drawText(5, 10, "LVGL support required", BOLD)
395-
lcd.drawText(5, 20, "Color LCD radio with", 0)
396-
lcd.drawText(5, 30, "EdgeTX 2.12+ or 3.0+", 0)
397-
lcd.drawText(5, 40, "needed", 0)
398-
end
399-
400395
-- ============================================================================
401396
-- Interface: init
402397
-- ============================================================================
403398

404399
function UI.init()
405-
if lvgl == nil then
406-
return
407-
end
408400
if VERSION_CHECK_ENABLED then
409401
versionCheckResult = checkEdgeTxVersion()
410402
end
411403
end
412404

413405
-- ============================================================================
414-
-- Interface: preCheck (LVGL-specific: version/availability)
406+
-- Interface: preCheck (version gate)
415407
-- ============================================================================
416408

417-
function UI.preCheck()
418-
if lvgl == nil then
419-
showLvglRequired()
420-
return 0
421-
end
422-
409+
function UI.preCheck(_event)
423410
if versionCheckResult == false then
424411
if not UI.uiBuilt then
425412
showVersionRequired()

0 commit comments

Comments
 (0)