Skip agc reset if in STATE_TX_WAIT

This commit is contained in:
Kevin Le committed 2026-06-24 21:49:53 +07:00
1 parent 2fd9685404
commit 1d1cba676c
1 file changed
+2 -2
+2 -2
View File
@@ -68,8 +68,8 @@ void RadioLibWrapper::doResetAGC() {
}
void RadioLibWrapper::resetAGC() {
// make sure we're not mid-receive of packet!
if ((state & STATE_INT_READY) != 0 || isReceivingPacket()) return;
// make sure we're not mid-receiving and mid-sending of packet!
if ((state & STATE_INT_READY) != 0 || isReceivingPacket() || (state == STATE_TX_WAIT)) return;
doResetAGC();
state = STATE_IDLE; // trigger a startReceive()