From a622781628c35eca58831c36e658e36b9a752712 Mon Sep 17 00:00:00 2001 From: Balint Kovacs Date: Sun, 28 Nov 2021 16:46:01 +0000 Subject: [PATCH] Make the recorder handle missing coordinates in plot speed --- apps/recorder/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/recorder/app.js b/apps/recorder/app.js index 3d06ebca4..fd4441422 100644 --- a/apps/recorder/app.js +++ b/apps/recorder/app.js @@ -360,6 +360,10 @@ function plotGraph(info, style) { var t,dx,dy,d,lt = c[timeIdx]; while(l!==undefined) { ++nl;c=l.split(","); + l = f.readLine(f); + if (c[latIdx] == "") { + continue; + }; t = c[timeIdx]; i = Math.round(80*(t - strt)/dur); p = Bangle.project({lat:c[latIdx],lon:c[lonIdx]}); @@ -372,7 +376,6 @@ function plotGraph(info, style) { } lp = p; lt = t; - l = f.readLine(f); } } else throw new Error("Unknown type "+style); var min=100000,max=-100000;