mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-08-27 22:35:04 +00:00
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:
@@ -48,6 +48,9 @@ uint32_t RadioLibWrapper::getRngSeed() {
|
||||
}
|
||||
|
||||
void RadioLibWrapper::setTxPower(int8_t dbm) {
|
||||
#if defined(USE_LR2021)
|
||||
idle();
|
||||
#endif
|
||||
_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; }
|
||||
|
||||
return PacketMillis {(preamble_us + 999) / 1000, (payload_us + 999) / 1000};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user