mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-21 12:40:59 +00:00
Don't send potentially bogus timestamps with fixed location (#4001)
This commit is contained in:
parent
10e3040494
commit
8d90c496d0
@ -211,11 +211,11 @@ meshtastic_MeshPacket *PositionModule::allocReply()
|
|||||||
// Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other
|
// Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other
|
||||||
// nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless
|
// nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless
|
||||||
// devices can get time.
|
// devices can get time.
|
||||||
if (getRTCQuality() < RTCQualityDevice) {
|
if (getRTCQuality() < RTCQualityGPS) {
|
||||||
LOG_INFO("Stripping time %u from position send\n", p.time);
|
LOG_INFO("Stripping time %u from position send\n", p.time);
|
||||||
p.time = 0;
|
p.time = 0;
|
||||||
} else {
|
} else {
|
||||||
p.time = getValidTime(RTCQualityDevice);
|
p.time = getValidTime(RTCQualityGPS);
|
||||||
LOG_INFO("Providing time to mesh %u\n", p.time);
|
LOG_INFO("Providing time to mesh %u\n", p.time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user