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

This commit is contained in:
Ben Meadors 2024-04-21 08:45:36 -05:00 committed by GitHub
parent 9822a85274
commit ac87c0065f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}