waypoints: draw gps course, too
parent
b41bc8a5d8
commit
2fe994541f
|
|
@ -211,7 +211,8 @@ let arrow = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Display function to show arrows for waypoint, north, and sun
|
// Display function to show arrows for waypoint, north, and sun
|
||||||
draw: function(currentPos, currentHeading) {
|
draw: function(currentPos) {
|
||||||
|
let currentHeading = currentPos.course;
|
||||||
g.clear().setFont("Vector", 22).setFontAlign(0, 0);
|
g.clear().setFont("Vector", 22).setFontAlign(0, 0);
|
||||||
|
|
||||||
// Calculate bearings
|
// Calculate bearings
|
||||||
|
|
@ -230,6 +231,9 @@ let arrow = {
|
||||||
if (1)
|
if (1)
|
||||||
this.drawArrow(waypointBearing, `${distStr}`, 3);
|
this.drawArrow(waypointBearing, `${distStr}`, 3);
|
||||||
|
|
||||||
|
if (1)
|
||||||
|
this.drawArrow(currentHeading, 'g', 1);
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
let s;
|
let s;
|
||||||
s = sun.sunPos();
|
s = sun.sunPos();
|
||||||
|
|
@ -387,7 +391,7 @@ function updateGoto() {
|
||||||
.setColor(0,0,0)
|
.setColor(0,0,0)
|
||||||
.drawString(msg, 3, 25);
|
.drawString(msg, 3, 25);
|
||||||
} else {
|
} else {
|
||||||
arrow.draw(fix, fix.course);
|
arrow.draw(fix);
|
||||||
}
|
}
|
||||||
setTimeout(updateGoto, 1000);
|
setTimeout(updateGoto, 1000);
|
||||||
}
|
}
|
||||||
|
|
@ -658,8 +662,8 @@ function addCard() {
|
||||||
{type:"txt", font:Math.min(15,100/result.length)+"%", pad:1, fillx:1, filly:1, label:result},
|
{type:"txt", font:Math.min(15,100/result.length)+"%", pad:1, fillx:1, filly:1, label:result},
|
||||||
{type:"txt", font:"12%", pad:1, fillx:1, filly:1, label:"already exists."},
|
{type:"txt", font:"12%", pad:1, fillx:1, filly:1, label:"already exists."},
|
||||||
{type:"h", c: [
|
{type:"h", c: [
|
||||||
{type:"btn", font:"10%", pad:1, fillx:1, filly:1, label: "REPLACE", cb:l=>{addCardName(result);}},
|
{type:"btn", font:"10%", pad:1, fillx:1, filly:1, label: "Replace", cb:l=>{addCardName(result);}},
|
||||||
{type:"btn", font:"10%", pad:1, fillx:1, filly:1, label: "CANCEL", cb:l=>{mainMenu();}}
|
{type:"btn", font:"10%", pad:1, fillx:1, filly:1, label: "Cancel", cb:l=>{mainMenu();}}
|
||||||
]}
|
]}
|
||||||
], lazy:true});
|
], lazy:true});
|
||||||
g.clear();
|
g.clear();
|
||||||
|
|
@ -675,7 +679,7 @@ gps.init();
|
||||||
function testArrow() {
|
function testArrow() {
|
||||||
arrow.name = "test";
|
arrow.name = "test";
|
||||||
arrow.waypoint.lat = 50;
|
arrow.waypoint.lat = 50;
|
||||||
arrow.waypoint.lon = 17;
|
arrow.waypoint.lon = 15;
|
||||||
goTo();
|
goTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue