Skip to content

Commit

Permalink
Don't rate-limit position requests for Lost and Found role
Browse files Browse the repository at this point in the history
  • Loading branch information
GUVWAF authored and fifieldt committed Feb 3, 2025
1 parent b370717 commit aec8f03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/PositionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aec8f03

Please sign in to comment.