Skip to content

Commit 38289d8

Browse files
authored
Merge pull request #190 from dzaro-dev/master
Adding support for the Radiomaster TX15 and other 480x320px color screen radios
2 parents f8d010b + b06820d commit 38289d8

File tree

3 files changed

+618
-5
lines changed

3 files changed

+618
-5
lines changed

src/SCRIPTS/TELEMETRY/iNav.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ local VERSION = "2.3.0"
66
local FILE_PATH = "/SCRIPTS/TELEMETRY/iNav/"
77
local SMLCD = LCD_W < 212
88
local HORUS = LCD_W >= 480 or LCD_H >= 480
9+
local TX15 = LCD_W == 480 and LCD_H == 320
910
local tmp, view, lang, playLog
1011
local env = "bt" -- compile on platform
1112
local inav = {}
@@ -535,10 +536,10 @@ function inav.run(event)
535536

536537
-- Views
537538
if data.v ~= config[25].v then
538-
view = nil
539-
collectgarbage()
540-
view = loadScript(FILE_PATH .. (HORUS and (data.nv and "nirvana" or "horus") or (config[25].v == 0 and "view" or (config[25].v == 1 and "pilot" or (config[25].v == 2 and "radar" or "alt")))) .. ext, env)()
541-
data.v = config[25].v
539+
view = nil
540+
collectgarbage()
541+
view = loadScript(FILE_PATH .. (HORUS and (TX15 and "tx15" or (data.nv and "nirvana" or "horus")) or (config[25].v == 0 and "view" or (config[25].v == 1 and "pilot" or (config[25].v == 2 and "radar" or "alt")))) .. ext, env)()
542+
data.v = config[25].v
542543
end
543544
view(data, config, modes, dir, units, labels, gpsDegMin, hdopGraph, icons, calcBearing, calcDir, VERSION, SMLCD, FILE_PATH, text, line, rect, fill, frmt)
544545
end

src/SCRIPTS/TELEMETRY/iNav/horus.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ local function view(data, config, modes, dir, units, labels, gpsDegMin, hdopGrap
553553
if data.headingHold then
554554
fill((x2 + x3) * 0.5 - 2, (y2 + y3) * 0.5 - 2, 5, 5, SOLID, data.set_flags(0,data.TextColor))
555555
else
556-
line(x2, y2, x3, y3, SOLID, data.set_flags(0, GREY))
556+
line(x2, y2, x3, y3, SOLID, data.set_flags(0, data.TextColor))
557557
end
558558
local tcol = data.set_flags(0, data.TextColor)
559559
line(x1, y1, x2, y2, SOLID, tcol)

0 commit comments

Comments
 (0)