Also refresh timestamp for "timeonly" fixed position nodes (#3689)

pull/3694/head
Ben Meadors 2024-04-21 08:45:36 -05:00 zatwierdzone przez GitHub
rodzic 9822a85274
commit ac87c0065f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -150,12 +150,13 @@ class NodeDB
void setLocalPosition(meshtastic_Position position, bool timeOnly = false)
{
if (timeOnly) {
LOG_DEBUG("Setting local position time only: time=%i\n", position.time);
LOG_DEBUG("Setting local position time only: time=%i timestamp=%i\n", position.time, position.timestamp);
localPosition.time = position.time;
localPosition.timestamp = position.timestamp > 0 ? position.timestamp : position.time;
return;
}
LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i\n", position.latitude_i, position.longitude_i,
position.time);
LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i, timeestamp=%i\n", position.latitude_i,
position.longitude_i, position.time, position.timestamp);
localPosition = position;
}