Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send potentially bogus timestamps with fixed location #4001

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading