Skip to content

Commit

Permalink
Don't send potentially bogus timestamps with fixed location (#4001)
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett authored May 31, 2024
1 parent 10e3040 commit 8d90c49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/PositionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// 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.
if (getRTCQuality() < RTCQualityDevice) {
if (getRTCQuality() < RTCQualityGPS) {
LOG_INFO("Stripping time %u from position send\n", p.time);
p.time = 0;
} else {
p.time = getValidTime(RTCQualityDevice);
p.time = getValidTime(RTCQualityGPS);
LOG_INFO("Providing time to mesh %u\n", p.time);
}

Expand Down Expand Up @@ -454,4 +454,4 @@ void PositionModule::handleNewPosition()
}
}

#endif
#endif

0 comments on commit 8d90c49

Please sign in to comment.