mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-21 20:51:00 +00:00
Also refresh timestamp for "timeonly" fixed position nodes (#3689)
This commit is contained in:
parent
9822a85274
commit
ac87c0065f
@ -150,12 +150,13 @@ class NodeDB
|
|||||||
void setLocalPosition(meshtastic_Position position, bool timeOnly = false)
|
void setLocalPosition(meshtastic_Position position, bool timeOnly = false)
|
||||||
{
|
{
|
||||||
if (timeOnly) {
|
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.time = position.time;
|
||||||
|
localPosition.timestamp = position.timestamp > 0 ? position.timestamp : position.time;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i\n", position.latitude_i, position.longitude_i,
|
LOG_DEBUG("Setting local position: latitude=%i, longitude=%i, time=%i, timeestamp=%i\n", position.latitude_i,
|
||||||
position.time);
|
position.longitude_i, position.time, position.timestamp);
|
||||||
localPosition = position;
|
localPosition = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user