From e17fe7e075b97f6cb3c1101318faa2999c2939b9 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Wed, 24 Mar 2021 19:24:01 +0800 Subject: [PATCH] update altitude in nodedb for received altitudes (reported by @iz1kga) --- src/mesh/NodeDB.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index f925665e..bc71dab3 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -451,6 +451,8 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p) info->position.latitude_i = p.latitude_i; info->position.longitude_i = p.longitude_i; } + if (p.altitude) + info->position.altitude = p.altitude; info->has_position = true; updateGUIforNode = info; notifyObservers(true); // Force an update whether or not our node counts have changed