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
66local deps = ...
@@ -334,11 +334,13 @@ end
334334local versionCheckResult = nil
335335
336336local 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 })
390393end
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
404399function UI .init ()
405- if lvgl == nil then
406- return
407- end
408400 if VERSION_CHECK_ENABLED then
409401 versionCheckResult = checkEdgeTxVersion ()
410402 end
411403end
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