getTxDelayMsecWeighted and startTransmitTimerRebroadcast: extract p->rxSnr

This commit is contained in:
Mike Robbins
2025-09-07 21:46:49 -07:00
parent 5a463373f2
commit 27cdd464d1
6 changed files with 12 additions and 11 deletions

View File

@@ -332,10 +332,11 @@ bool RadioInterface::shouldRebroadcastEarlyLikeRouter(meshtastic_MeshPacket *p)
}
/** The delay to use when we want to flood a message */
uint32_t RadioInterface::getTxDelayMsecWeighted(float snr, meshtastic_MeshPacket *p)
uint32_t RadioInterface::getTxDelayMsecWeighted(meshtastic_MeshPacket *p)
{
// high SNR = large CW size (Long Delay)
// low SNR = small CW size (Short Delay)
float snr = p->rx_snr;
uint32_t delay = 0;
uint8_t CWsize = getCWsize(snr);
// LOG_DEBUG("rx_snr of %f so setting CWsize to:%d", snr, CWsize);