mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* added Packet::getRawLength() helper
This commit is contained in:
parent
3c7ff8da29
commit
ab8cd85d8e
5 changed files with 16 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ bool Mesh::allowPacketForward(const mesh::Packet* packet) {
|
|||
return false; // by default, Transport NOT enabled
|
||||
}
|
||||
uint32_t Mesh::getRetransmitDelay(const mesh::Packet* packet) {
|
||||
uint32_t t = (_radio->getEstAirtimeFor(packet->path_len + packet->payload_len + 2) * 52 / 50) / 2;
|
||||
uint32_t t = (_radio->getEstAirtimeFor(packet->getRawLength()) * 52 / 50) / 2;
|
||||
|
||||
return _rng->nextInt(0, 5)*t;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue