Skip to content

Commit

Permalink
waypoints: hopefully fix rest of warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelmachek committed Nov 13, 2024
1 parent 4fa9752 commit 72f7527
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions apps/waypoints/waypoints.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ function mainMenu() {
}

function updateGps() {
let have = false, lat = "lat ", alt = "?",
speed = "speed ", hdop = "?";
let lat = "lat ", alt = "?";

if (cancel_gps)
return;
Expand All @@ -347,7 +346,6 @@ function updateGps() {
alt = "" + fix.alt.toFixed(0);
// speed = "" + fix.speed.toFixed(1);
// hdop = "" + fix.hdop.toFixed(0);
have = true;
} else {
lat = "NO FIX\n"
+ "" + (getTime() - gps_start).toFixed(0) + "s ";
Expand All @@ -364,8 +362,7 @@ function updateGps() {
}

function updateGoto() {
let have = false, lat = "lat ", alt = "?",
speed = "speed ", hdop = "?";
let have = false, lat = "lat ", alt = "?";

if (cancel_gps)
return;
Expand Down Expand Up @@ -603,6 +600,7 @@ var s, res;
function askCoordinate(t1, t2, callback) {
//let sign = 1;
ask01(t1, function(sign) {
let d, m, s;
switch (fmt.geo_mode) {
case 0: s = "DDD.dddd"; break;
case 1: s = "DDD MM.mmm"; break;
Expand All @@ -614,14 +612,14 @@ function askCoordinate(t1, t2, callback) {
res = parseFloat(key);
break;
case 1:
let d = parseInt(key.substr(0, 3));
let m = parseFloat(key.substr(3,99));
d = parseInt(key.substr(0, 3));
m = parseFloat(key.substr(3,99));
res = d + m/60.0;
break;
case 2:
d = parseInt(key.substr(0, 3));
m = parseInt(key.substr(4, 2));
let s = parseInt(key.substr(7, 2));
s = parseInt(key.substr(7, 2));
res = d + m/60.0 + s/3600.0;
}
res = sign * res;
Expand Down

0 comments on commit 72f7527

Please sign in to comment.