Skip to content

Commit a72f907

Browse files
committed
Fix vtx frequency backward compatibility
1 parent 5a91d58 commit a72f907

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/SCRIPTS/BF/PAGES/vtx.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ end
3535

3636
if apiVersion >= 1.037 then
3737
fields[#fields + 1] = { t = "Frequency", x = x, y = inc.y(lineSpacing), sp = x + sp, min = 5000, max = 5999, vals = { 6 }, upd = function(self) self.handleFreqValUpdate(self) end }
38+
elseif apiVersion >= 1.036 then
39+
fields[#fields + 1] = { t = "Frequency", x = x, y = inc.y(lineSpacing), sp = x + sp, min = 5000, max = 5999, ro = true }
3840
end
3941

4042
-- Vals Fields

src/SCRIPTS/BF/ui.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ local function run_ui(event)
342342
elseif event == EVT_VIRTUAL_ENTER then
343343
if Page then
344344
local f = Page.fields[currentField]
345-
if Page.values and Page.values[f.vals[#f.vals]] and not f.ro then
345+
if Page.values and f.vals and Page.values[f.vals[#f.vals]] and not f.ro then
346346
pageState = pageStatus.editing
347347
end
348348
end

0 commit comments

Comments
 (0)