From 62b310ac5c868075ef08e4670e2c53a4726cfd43 Mon Sep 17 00:00:00 2001 From: Wolfgang Nagele Date: Mon, 10 Jun 2024 15:10:17 +0200 Subject: [PATCH] Relax changes from #4001 to allow GPS and NTP as trusted sources (#4068) --- src/modules/PositionModule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 002111171..49f2b808b 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -209,13 +209,13 @@ meshtastic_MeshPacket *PositionModule::allocReply() p.ground_speed = localPosition.ground_speed; // 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() < RTCQualityGPS) { + // nodes shouldn't trust it anyways) Note: we allow a device with a local GPS or NTP to include the time, so that devices + // without can get time. + if (getRTCQuality() < RTCQualityNTP) { LOG_INFO("Stripping time %u from position send\n", p.time); p.time = 0; } else { - p.time = getValidTime(RTCQualityGPS); + p.time = getValidTime(RTCQualityNTP); LOG_INFO("Providing time to mesh %u\n", p.time); }