bikespeedo: guard against showing NaN speed

pull/2733/head
Rob Pilling 2023-05-07 23:08:04 +01:00
parent cf4daf58fe
commit afe37b55fa
1 changed files with 2 additions and 0 deletions

View File

@ -403,6 +403,8 @@ function onGPS(fix) {
if ( sp < 10 ) sp = sp.toFixed(1);
else sp = Math.round(sp);
if (isNaN(sp)) sp = '---';
if (parseFloat(sp) > parseFloat(max.spd) && max.n > 15 ) max.spd = parseFloat(sp);
// Altitude