1
0
Fork 0

Update gps-info.js : make nofBD and nofGP global

...otherwise one of them is always zero.
Thanks, BartS23
master
Hilmar Strauch 2022-01-03 11:49:43 +01:00 committed by GitHub
parent 495ee69251
commit aa45ecdb96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,8 @@ var lastFix = {
satellites: 0
};
var SATinView = 0;
var nofBD = 0;
var nofGP = 0;
function formatTime(now) {
if (now == undefined) {
@ -109,8 +111,6 @@ function onGPS(fix) {
}
function onGPSraw(nmea) {
var nofBD = 0;
var nofGP = 0;
if (nmea.slice(3,6) == "GSV") {
// console.log(nmea);
if (nmea.slice(0,7) == "$BDGSV,") nofBD = Number(nmea.slice(11,13));