Merge pull request #759 from geeksville/dev1.2

update altitude in nodedb for received altitudes (reported by @iz1kga)
1.2-legacy
Kevin Hester 2021-03-24 19:25:48 +08:00 zatwierdzone przez GitHub
commit 770788d0a4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -451,6 +451,8 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p)
info->position.latitude_i = p.latitude_i; info->position.latitude_i = p.latitude_i;
info->position.longitude_i = p.longitude_i; info->position.longitude_i = p.longitude_i;
} }
if (p.altitude)
info->position.altitude = p.altitude;
info->has_position = true; info->has_position = true;
updateGUIforNode = info; updateGUIforNode = info;
notifyObservers(true); // Force an update whether or not our node counts have changed notifyObservers(true); // Force an update whether or not our node counts have changed