Skip to content

Commit 62b310a

Browse files
authored
Relax changes from #4001 to allow GPS and NTP as trusted sources (#4068)
1 parent 4f906ae commit 62b310a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/modules/PositionModule.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ meshtastic_MeshPacket *PositionModule::allocReply()
209209
p.ground_speed = localPosition.ground_speed;
210210

211211
// Strip out any time information before sending packets to other nodes - to keep the wire size small (and because other
212-
// nodes shouldn't trust it anyways) Note: we allow a device with a local GPS to include the time, so that gpsless
213-
// devices can get time.
214-
if (getRTCQuality() < RTCQualityGPS) {
212+
// nodes shouldn't trust it anyways) Note: we allow a device with a local GPS or NTP to include the time, so that devices
213+
// without can get time.
214+
if (getRTCQuality() < RTCQualityNTP) {
215215
LOG_INFO("Stripping time %u from position send\n", p.time);
216216
p.time = 0;
217217
} else {
218-
p.time = getValidTime(RTCQualityGPS);
218+
p.time = getValidTime(RTCQualityNTP);
219219
LOG_INFO("Providing time to mesh %u\n", p.time);
220220
}
221221

0 commit comments

Comments
 (0)