From 7ed362c49ca54a5ab12eb80a19209781e027b58d Mon Sep 17 00:00:00 2001 From: "pls.153" Date: Fri, 8 Sep 2023 20:04:03 +0200 Subject: [PATCH] example 'meshtastic': fix gps timestamp --- examples/meshtastic/qml/main.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/meshtastic/qml/main.qml b/examples/meshtastic/qml/main.qml index 7ce47a1..783d24a 100644 --- a/examples/meshtastic/qml/main.qml +++ b/examples/meshtastic/qml/main.qml @@ -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" + } } }