From 646d1caf66a3d69102e587e3442d615ea39145a4 Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Thu, 28 Oct 2021 11:31:19 +0000 Subject: [PATCH] updatePosition process time-only message --- src/mesh/NodeDB.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index e5594b212..6f1d26f6a 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -457,10 +457,19 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p, RxSource src) p.pos_timestamp, p.time, p.latitude_i, p.longitude_i); info->position = p; + } else if ((p.time > 0) && !p.latitude_i && !p.longitude_i && !p.pos_timestamp && + !p.location_source) { + // FIXME SPECIAL TIME SETTING PACKET FROM EUD TO RADIO + // (stop-gap fix for issue #900) + DEBUG_MSG("updatePosition SPECIAL time setting time=%u\n", p.time); + info->position.time = p.time; + } else { // Be careful to only update fields that have been set by the REMOTE sender // A lot of position reports don't have time populated. In that case, be careful to not blow away the time we // recorded based on the packet rxTime + // + // FIXME perhaps handle RX_SRC_USER separately? DEBUG_MSG("updatePosition REMOTE node=0x%x time=%u, latI=%d, lonI=%d\n", nodeId, p.time, p.latitude_i, p.longitude_i);