Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2bb0f1f

Browse files
committedSep 1, 2019
Scaled map to fit
1 parent 8040967 commit 2bb0f1f

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
 
9 Bytes
Binary file not shown.

‎src/iNav/nirvana.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ local function view(data, config, modes, units, labels, gpsDegMin, hdopGraph, ic
441441

442442
if data.gpsHome ~= false then
443443
-- Craft location
444-
tmp2 = config[31].v == 1 and 50 or 100
444+
tmp2 = config[31].v == 1 and 65 or 130
445445
d = data.distanceLast >= data.distRef and min(max(data.distanceLast / maxDist * tmp2, 7), tmp2) or 1
446446
local bearing = calcBearing(data.gpsHome, data.gpsLatLon) - tmp
447447
local rad1 = rad(bearing)

1 commit comments

Comments
 (1)

bostontrucker commented on Nov 30, 2019

@bostontrucker

@@ -441,7 +441,7 @@ local function view(data, config, modes, units, labels, gpsDegMin, hdopGraph, ic

	if data.gpsHome ~= false then			if data.gpsHome ~= false then
		-- Craft location				-- Craft location
		tmp2 = config[31].v == 1 and 50 or 100				tmp2 = config[31].v == 1 and 65 or 130
		d = data.distanceLast >= data.distRef and min(max(data.distanceLast / maxDist * tmp2, 7), tmp2) or 1				d = data.distanceLast >= data.distRef and min(max(data.distanceLast / maxDist * tmp2, 7), tmp2) or 1
		local bearing = calcBearing(data.gpsHome, data.gpsLatLon) - tmp				local bearing = calcBearing(data.gpsHome, data.gpsLatLon) - tmp
		local rad1 = rad(bearing)				local rad1 = rad(bearing)
		cx = floor(sin(rad1) * d + 0.5)				cx = floor(sin(rad1) * d + 0.5)
		cy = floor(cos(rad1) * d + 0.5)				cy = floor(cos(rad1) * d + 0.5)
		-- Home position				-- Home position
		local hx = X_CNTR + 2				local hx = X_CNTR + 2
		local hy = Y_CNTR				local hy = Y_CNTR
		if config[31].v ~= 1 then				if config[31].v ~= 1 then
			hx = hx - (d > 9 and cx * 0.5 or 0)					hx = hx - (d > 9 and cx * 0.5 or 0)
			hy = hy + (d > 9 and cy * 0.5 or 0)					hy = hy + (d > 9 and cy * 0.5 or 0)
		end				end
		if d >= 12 then				if d >= 12 then
			--bmap(icons.home, hx - 4, hy - 5)					--bmap(icons.home, hx - 4, hy - 5)
			bmap(icons.home[1], hx - 8, hy - 10)					bmap(icons.home[1], hx - 8, hy - 10)
		elseif d > 1 then				elseif d > 1 then
			fill(hx - 1, hy - 1, 3, 3, SOLID)					fill(hx - 1, hy - 1, 3, 3, SOLID)
		end				end
		-- Shift craft location				-- Shift craft location
		cx = d == 1 and X_CNTR + 2 or cx + hx				cx = d == 1 and X_CNTR + 2 or cx + hx
		cy = d == 1 and Y_CNTR or hy - cy				cy = d == 1 and Y_CNTR or hy - cy
	else			else
		cx = X_CNTR + 2				cx = X_CNTR + 2
Please sign in to comment.