Skip to content

Commit

Permalink
Display message if page not available
Browse files Browse the repository at this point in the history
  • Loading branch information
klutvott123 committed Mar 12, 2023
1 parent e2597af commit 3ea553e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SCRIPTS/BF/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ local function createPopupMenu()
end

local function processMspReply(cmd,rx_buf,err)
if not Page or not rx_buf or err then
if not Page or not rx_buf then
elseif cmd == Page.write then
if Page.eepromWrite then
eepromWrite()
Expand All @@ -109,6 +109,9 @@ local function processMspReply(cmd,rx_buf,err)
rebootFc()
end
invalidatePages()
elseif cmd == Page.read and err then
Page.fields = { { x = 6, y = radio.yMinLimit, value = "", ro = true } }
Page.labels = { { x = 6, y = radio.yMinLimit, t = "N/A" } }
elseif cmd == Page.read and #rx_buf > 0 then
Page.values = rx_buf
for i=1,#Page.fields do
Expand Down

0 comments on commit 3ea553e

Please sign in to comment.