mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-11-04 07:27:22 +00:00
Use packet radio settings for forwarding delays
This commit is contained in:
1 parent
898e1b8097
commit
e27a4ecf2c
6 files changed
+224
-11
No files matched your search
@@ -442,11 +442,13 @@ int SensorMesh::calcRxDelay(float score, uint32_t air_time) const {
|
||||
}
|
||||
|
||||
uint32_t SensorMesh::getRetransmitDelay(const mesh::Packet* packet) {
|
||||
uint32_t t = (_radio->getEstAirtimeFor(packet->getPathByteLen() + packet->payload_len + 2) * _prefs.tx_delay_factor);
|
||||
uint32_t t = (_radio->getProfileAirtime(packet->radio_profile,
|
||||
packet->getRawLength(), packet->tx_cr) * _prefs.tx_delay_factor);
|
||||
return getRNG()->nextInt(0, 6)*t;
|
||||
}
|
||||
uint32_t SensorMesh::getDirectRetransmitDelay(const mesh::Packet* packet) {
|
||||
uint32_t t = (_radio->getEstAirtimeFor(packet->getPathByteLen() + packet->payload_len + 2) * _prefs.direct_tx_delay_factor);
|
||||
uint32_t t = (_radio->getProfileAirtime(packet->radio_profile,
|
||||
packet->getRawLength(), packet->tx_cr) * _prefs.direct_tx_delay_factor);
|
||||
return getRNG()->nextInt(0, 6)*t;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user