Skip to content

Commit

Permalink
Simplified some logic and updated example image
Browse files Browse the repository at this point in the history
  • Loading branch information
teckel12 committed Mar 28, 2019
1 parent 4f36ecb commit 1457e14
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified assets/iNavX9Dalt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dist/SCRIPTS/TELEMETRY/iNav/alt.luac
Binary file not shown.
4 changes: 2 additions & 2 deletions src/iNav/alt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ local function view(data, config, modes, units, labels, gpsDegMin, hdopGraph, ic
end
end
if data.altMin < -1 then
cy = BOTTOM - (-data.altMin * tmp)
cy = data.altMin * tmp + BOTTOM
lcd.drawLine(RIGHT_POS - 60, cy, RIGHT_POS, cy, DOTTED, 0)
end
if not SMLCD then
Expand All @@ -98,7 +98,7 @@ local function view(data, config, modes, units, labels, gpsDegMin, hdopGraph, ic
local r1 = math.rad(tmp)
local r2 = math.rad(tmp + 145)
local r3 = math.rad(tmp - 145)
local x1, y1, x2, y2, x3, y3 = calcDir(r1, r2, r3, LEFT_POS + (data.altMin < -1 and 10 or 14), 45, 7)
local x1, y1, x2, y2, x3, y3 = calcDir(r1, r2, r3, LEFT_POS + 14, 45, 7)
if data.headingHold then
lcd.drawFilledRectangle((x2 + x3) / 2 - 1, (y2 + y3) / 2 - 1, 3, 3, SOLID)
else
Expand Down

0 comments on commit 1457e14

Please sign in to comment.