* new Dispatcher::getCADFailRetryDelay()

This commit is contained in:
Scott Powell 2025-02-27 04:05:50 +11:00
parent be2af61dfe
commit 189ed79d46
13 changed files with 55 additions and 15 deletions

View file

@ -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) {