Don't rate-limit position requests for Lost and Found role (#5981)

This commit is contained in:
GUVWAF
2025-02-03 19:24:47 +08:00
committed by GitHub
co-authored by GitHub
parent b370717dcd
commit d740934278
+2 -1
View File
@@ -276,7 +276,8 @@ meshtastic_MeshPacket *PositionModule::allocPositionPacket()
meshtastic_MeshPacket *PositionModule::allocReply()
{
if (lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 3 * 60 * 1000)) {
if (config.device.role != meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND && lastSentToMesh &&
Throttle::isWithinTimespanMs(lastSentToMesh, 3 * 60 * 1000)) {
LOG_DEBUG("Skip Position reply since we sent it <3min ago");
ignoreRequest = true; // Mark it as ignored for MeshModule
return nullptr;