Merge branch 'dev' into dev1.2

# Conflicts:
#	src/mesh/NodeDB.cpp
pull/706/head
Kevin Hester 2021-02-25 08:56:36 +08:00
commit 66638655a5
2 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -42,6 +42,7 @@ For an detailed walk-through aimed at beginners, we recommend [meshtastic.letsta
### Related Groups
Telegram group for **Italy**-based users [t.me/meshtastic_italia](http://t.me/meshtastic_italia) (Italian language, unofficial).
Telegram group for **Russian**-based users [t.me/meshtastic_russia](https://t.me/meshtastic_russia) (Russian language, unofficial).
# Updates

Wyświetl plik

@ -357,12 +357,16 @@ void NodeDB::updatePosition(uint32_t nodeId, const Position &p)
DEBUG_MSG("DB update position node=0x%x time=%u, latI=%d, lonI=%d\n", nodeId, p.time, p.latitude_i, p.longitude_i);
auto oldtime = info->position.time;
info->position = p;
if(p.time == 0 && oldtime != 0) {
// 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
info->position.time = oldtime;
// Be careful to only update fields that have been set by the 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
if (!info->position.time && p.time)
info->position.time = p.time;
if(p.battery_level)
info->position.battery_level = p.battery_level;
if (p.latitude_i || p.longitude_i) {
info->position.latitude_i = p.latitude_i;
info->position.longitude_i = p.longitude_i;
}
info->has_position = true;
updateGUIforNode = info;