Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/SCRIPTS/BF/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ local function processMspReply(cmd,rx_buf)
if cmd == nil or rx_buf == nil then
return
end
if Page == nil then
return
end
if cmd == Page.write then
if Page.eepromWrite then
eepromWrite()
Expand Down Expand Up @@ -349,10 +352,12 @@ function run_ui(event)
elseif event == EVT_VIRTUAL_NEXT or event == EVT_VIRTUAL_NEXT_REPT then
incLine(1)
elseif event == EVT_VIRTUAL_ENTER then
local field = Page.fields[currentLine]
local idx = field.i or currentLine
if Page.values and Page.values[idx] and (field.ro ~= true) then
currentState = pageStatus.editing
if Page then
local field = Page.fields[currentLine]
local idx = field.i or currentLine
if Page.values and Page.values[idx] and (field.ro ~= true) then
currentState = pageStatus.editing
end
end
elseif event == EVT_VIRTUAL_EXIT then
if isTelemetryScript then
Expand Down