example 'meshtastic': fix gps timestamp

This commit is contained in:
pls.153 2023-09-08 20:04:03 +02:00
parent 46434d914f
commit 7ed362c49c

View file

@ -138,7 +138,12 @@ Item {
var coor = position.coordinate;
lat = coor.latitude
lon = coor.longitude
time = coor.timestamp ? String(coor.timestamp.getTime()) : "0"
if (position.timestamp) {
var stime = String(position.timestamp.getTime())
time = stime.substring(0, stime.length - 3)
} else {
time = "0"
}
}
}