Merge pull request #3218 from fkallay1/fix/lr2021-set-tx-power-rx-stall
Fix LR2021 occasionally stopping reception after a TX power change
This commit is contained in:
commit
22bc13804c
1 file changed
+4
-1
@@ -48,6 +48,9 @@ uint32_t RadioLibWrapper::getRngSeed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RadioLibWrapper::setTxPower(int8_t dbm) {
|
void RadioLibWrapper::setTxPower(int8_t dbm) {
|
||||||
|
#if defined(USE_LR2021)
|
||||||
|
idle();
|
||||||
|
#endif
|
||||||
_radio->setOutputPower(dbm);
|
_radio->setOutputPower(dbm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,4 +257,4 @@ PacketMillis RadioLibWrapper::calcMaxPacketMillis(uint8_t sf, float bw, uint8_t
|
|||||||
if (cr >= 5 && cr < 8) { payload_us = (payload_us * 8) / cr; }
|
if (cr >= 5 && cr < 8) { payload_us = (payload_us * 8) / cr; }
|
||||||
|
|
||||||
return PacketMillis {(preamble_us + 999) / 1000, (payload_us + 999) / 1000};
|
return PacketMillis {(preamble_us + 999) / 1000, (payload_us + 999) / 1000};
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user