mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 15:10:40 +00:00
Pass meshtastic_MeshPacket down into startTransmitTimerRebroadcast and getTxDelayMsecWeighted
This commit is contained in:
@@ -43,7 +43,7 @@ void SimRadio::setTransmitDelay()
|
||||
} else {
|
||||
// If there is a SNR, start a timer scaled based on that SNR.
|
||||
LOG_DEBUG("rx_snr found. hop_limit:%d rx_snr:%f", p->hop_limit, p->rx_snr);
|
||||
startTransmitTimerRebroadcast(p->rx_snr);
|
||||
startTransmitTimerRebroadcast(p->rx_snr, p);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@ void SimRadio::startTransmitTimer(bool withDelay)
|
||||
}
|
||||
}
|
||||
|
||||
void SimRadio::startTransmitTimerRebroadcast(float snr)
|
||||
void SimRadio::startTransmitTimerRebroadcast(float snr, meshtastic_MeshPacket *p)
|
||||
{
|
||||
// If we have work to do and the timer wasn't already scheduled, schedule it now
|
||||
if (!txQueue.empty()) {
|
||||
uint32_t delayMsec = getTxDelayMsecWeighted(snr);
|
||||
uint32_t delayMsec = getTxDelayMsecWeighted(snr, p);
|
||||
// LOG_DEBUG("xmit timer %d", delay);
|
||||
notifyLater(delayMsec, TRANSMIT_DELAY_COMPLETED, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user