mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 10:42:08 +00:00
Send NAK only to the API upon duty cycle limit
This commit is contained in:
parent
a3b93a4dcf
commit
e13fb9919e
@ -205,7 +205,11 @@ ErrorCode Router::send(MeshPacket *p)
|
|||||||
uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle);
|
uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle);
|
||||||
LOG_WARN("Duty cycle limit exceeded. Aborting send for now, you can send again in %d minutes.\n", silentMinutes);
|
LOG_WARN("Duty cycle limit exceeded. Aborting send for now, you can send again in %d minutes.\n", silentMinutes);
|
||||||
Routing_Error err = Routing_Error_DUTY_CYCLE_LIMIT;
|
Routing_Error err = Routing_Error_DUTY_CYCLE_LIMIT;
|
||||||
|
if (getFrom(p) == nodeDB.getNodeNum()) { // only send NAK to API, not to the mesh
|
||||||
abortSendAndNak(err, p);
|
abortSendAndNak(err, p);
|
||||||
|
} else {
|
||||||
|
packetPool.release(p);
|
||||||
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user