Skip to content

Commit

Permalink
Merge pull request #155 from iNavFlight/jumper_t15
Browse files Browse the repository at this point in the history
fix JumperT15
  • Loading branch information
stronnag authored Aug 5, 2024
2 parents 5564837 + 281e9b6 commit 7a34563
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/SCRIPTS/TELEMETRY/iNav.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Docs: https://github.com/iNavFlight/OpenTX-Telemetry-Widget

local zone, options = ...
local VERSION = "2.2.4"
local VERSION = "2.2.5"
local FILE_PATH = "/SCRIPTS/TELEMETRY/iNav/"
local SMLCD = LCD_W < 212
local HORUS = LCD_W >= 480 or LCD_H >= 480
Expand Down
24 changes: 13 additions & 11 deletions src/SCRIPTS/TELEMETRY/iNav/func_h.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,21 @@ function data.clear(event)
data.lastevt = event
end
end
if event == 0 and data.lastt6 ~= nil then
if getValue(data.t6_id) > data.lastt6 then
event = data.nv and EVT_VIRTUAL_PREV or EVT_ROT_LEFT -- Up
elseif getValue(data.t6_id) < data.lastt6 then
event = data.nv and EVT_VIRTUAL_NEXT or EVT_ROT_RIGHT -- Down
end
if data.t6_id ~= nil then
if event == 0 and data.lastt6 ~= nil then
if getValue(data.t6_id) > data.lastt6 then
event = data.nv and EVT_VIRTUAL_PREV or EVT_ROT_LEFT -- Up
elseif getValue(data.t6_id) < data.lastt6 then
event = data.nv and EVT_VIRTUAL_NEXT or EVT_ROT_RIGHT -- Down
end
end
data.lastt6 = not data.nv and getValue(data.t6_id) or nil
if data.lastt6 == 0 then
data.lastt6 = nil
end
end
if event == 0 and data.doLogs and getValue(data.hcurx_id) < -940 then
event = EVT_EXIT_BREAK -- Left (exit)
end
data.lastt6 = not data.nv and getValue(data.t6_id) or nil
if data.lastt6 == 0 then
data.lastt6 = nil
event = EVT_EXIT_BREAK -- Left (exit)
end
end
return event
Expand Down

0 comments on commit 7a34563

Please sign in to comment.