Skip to content

Commit 86edfe2

Browse files
committed
fix agc reset
1 parent d05d6ab commit 86edfe2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/helpers/radiolib/RadioLibWrappers.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ void RadioLibWrapper::resetAGC() {
5757
// make sure we're not mid-receive of packet!
5858
if ((state & STATE_INT_READY) != 0 || isReceivingPacket()) return;
5959

60-
// NOTE: according to higher powers, just issuing RadioLib's startReceive() will reset the AGC.
61-
// revisit this if a better impl is discovered.
60+
// Warm sleep powers down the entire analog frontend (including AGC), forcing a
61+
// fresh gain calibration on the next startReceive(). A plain standby->startReceive
62+
// cycle does NOT reset the AGC — the analog state can persist across STDBY_RC.
63+
// The ~1-2 ms sleep gap is negligible vs the preamble budget (131 ms at SF11/BW250).
64+
_radio->sleep();
6265
state = STATE_IDLE; // trigger a startReceive()
6366
}
6467

0 commit comments

Comments
 (0)