We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 48c39d3 + 8e2f496 commit f8c7a79Copy full SHA for f8c7a79
src/SCRIPTS/BF/radios.lua
@@ -34,7 +34,7 @@ local supportedRadios =
34
resolution = lcdResolution.high,
35
MenuBox = { x=120, y=100, w=200, x_offset=68, h_line=20, h_offset=6 },
36
SaveBox = { x=120, y=100, w=180, x_offset=12, h=60, h_offset=12 },
37
- NoTelem = { 192, LCD_H - 28, "No Telemetry", TEXT_COLOR + INVERS + BLINK },
+ NoTelem = { 192, LCD_H - 28, "No Telemetry", (TEXT_COLOR or 0) + INVERS + BLINK },
38
textSize = 0,
39
yMinLimit = 35,
40
yMaxLimit = 235,
@@ -45,7 +45,7 @@ local supportedRadios =
45
46
MenuBox = { x= (LCD_W -200)/2, y=LCD_H/2, w=200, x_offset=68, h_line=20, h_offset=6 },
47
SaveBox = { x= (LCD_W -200)/2, y=LCD_H/2, w=180, x_offset=12, h=60, h_offset=12 },
48
- NoTelem = { LCD_W/2 - 50, LCD_H - 28, "No Telemetry", TEXT_COLOR + INVERS + BLINK },
+ NoTelem = { LCD_W/2 - 50, LCD_H - 28, "No Telemetry", (TEXT_COLOR or 0) + INVERS + BLINK },
49
50
51
yMaxLimit = 435,
src/SCRIPTS/BF/ui.lua
@@ -144,7 +144,7 @@ local function incMax(val, inc, base)
144
return ((val + inc + base - 1) % base) + 1
145
end
146
147
-local function clipValue(val,min,max)
+function clipValue(val,min,max)
148
if val < min then
149
val = min
150
elseif val > max then
@@ -239,7 +239,6 @@ end
239
240
local function incValue(inc)
241
local f = Page.fields[currentField]
242
- local idx = f.i or currentField
243
local scale = (f.scale or 1)
244
local mult = (f.mult or 1)
245
f.value = clipValue(f.value + ((inc*mult)/scale), ((f.min or 0)/scale), ((f.max or 255)/scale))
@@ -384,9 +383,8 @@ local function run_ui(event)
384
383
incField(1)
385
elseif event == EVT_VIRTUAL_ENTER then
386
if Page then
387
- local field = Page.fields[currentField]
388
- local idx = field.i or currentField
389
- if Page.values and Page.values[idx] and (field.ro ~= true) then
+ local f = Page.fields[currentField]
+ if Page.values and Page.values[f.vals[#f.vals]] and not f.ro then
390
pageState = pageStatus.editing
391
392
0 commit comments