Make RXPS preamble adaptive for fast radio settings
This commit is contained in:
1 parent
444df2969d
commit
e7433abb80
31 files changed
+1393
-242
No files matched your search
@@ -116,10 +116,6 @@ void Dispatcher::restoreOutboundTxOverrides() {
|
||||
_radio->setCodingRate(outbound_restore_cr);
|
||||
outbound_restore_cr = 0;
|
||||
}
|
||||
if (outbound_restore_preamble_len != 0) {
|
||||
_radio->setPreambleLength(outbound_restore_preamble_len);
|
||||
outbound_restore_preamble_len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool Dispatcher::startOutboundTransmit() {
|
||||
@@ -146,9 +142,7 @@ bool Dispatcher::startOutboundTransmit() {
|
||||
|
||||
uint32_t max_airtime = _radio->getEstAirtimeFor(len) * 3 / 2;
|
||||
outbound_restore_cr = 0;
|
||||
outbound_restore_preamble_len = 0;
|
||||
uint8_t default_cr = getDefaultTxCodingRate();
|
||||
bool is_retry = outbound->tx_cr >= 4 && outbound->tx_cr <= 8;
|
||||
if (outbound->tx_cr >= 4 && outbound->tx_cr <= 8
|
||||
&& default_cr >= 4 && default_cr <= 8
|
||||
&& outbound->tx_cr != default_cr) {
|
||||
@@ -160,14 +154,6 @@ bool Dispatcher::startOutboundTransmit() {
|
||||
getLogDateTime(), (uint32_t)outbound->tx_cr);
|
||||
}
|
||||
}
|
||||
if (is_retry) {
|
||||
uint16_t default_preamble_len = _radio->getDefaultPreambleLength();
|
||||
if (default_preamble_len != 32 && _radio->setPreambleLength(32)) {
|
||||
outbound_restore_preamble_len = default_preamble_len;
|
||||
max_airtime = _radio->getEstAirtimeFor(len) * 3 / 2;
|
||||
}
|
||||
}
|
||||
|
||||
outbound_start = _ms->getMillis();
|
||||
if (!_radio->startSendRaw(raw, len)) {
|
||||
MESH_DEBUG_PRINTLN("%s Dispatcher::startOutboundTransmit(): ERROR: send start failed!",
|
||||
|
||||
Reference in new issue
Block a user