mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* new Dispatcher::getCADFailRetryDelay()
This commit is contained in:
parent
be2af61dfe
commit
189ed79d46
13 changed files with 55 additions and 15 deletions
|
|
@ -26,6 +26,10 @@ int Dispatcher::calcRxDelay(float score, uint32_t air_time) const {
|
|||
return (int) ((pow(10, 0.85f - score) - 1.0) * air_time);
|
||||
}
|
||||
|
||||
uint32_t Dispatcher::getCADFailRetryDelay() const {
|
||||
return 200;
|
||||
}
|
||||
|
||||
void Dispatcher::loop() {
|
||||
if (outbound) { // waiting for outbound send to be completed
|
||||
if (_radio->isSendComplete()) {
|
||||
|
|
@ -165,7 +169,10 @@ void Dispatcher::processRecvPacket(Packet* pkt) {
|
|||
void Dispatcher::checkSend() {
|
||||
if (_mgr->getOutboundCount() == 0) return; // nothing waiting to send
|
||||
if (!millisHasNowPassed(next_tx_time)) return; // still in 'radio silence' phase (from airtime budget setting)
|
||||
if (_radio->isReceiving()) return; // LBT - check if radio is currently mid-receive, or if channel activity
|
||||
if (_radio->isReceiving()) { // LBT - check if radio is currently mid-receive, or if channel activity
|
||||
next_tx_time = futureMillis(getCADFailRetryDelay());
|
||||
return;
|
||||
}
|
||||
|
||||
outbound = _mgr->getNextOutbound(_ms->getMillis());
|
||||
if (outbound) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue