Skip agc reset if in STATE_TX_WAIT
This commit is contained in:
1 parent
2fd9685404
commit
1d1cba676c
1 file changed
+2
-2
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user