[SX126x] Fix second call to startReceive breaking reception (#1272)

This commit is contained in:
jgromes 2024-10-14 16:37:19 +01:00
parent 94d5d59d80
commit 56ae9ad76b

View file

@ -720,11 +720,15 @@ int16_t SX126x::startReceiveDutyCycleAuto(uint16_t senderPreambleLength, uint16_
}
int16_t SX126x::startReceiveCommon(uint32_t timeout, RadioLibIrqFlags_t irqFlags, RadioLibIrqFlags_t irqMask) {
// ensure we are in standby
int16_t state = standby();
RADIOLIB_ASSERT(state);
// set DIO mapping
if(timeout != RADIOLIB_SX126X_RX_TIMEOUT_INF) {
irqMask |= (1UL << RADIOLIB_IRQ_TIMEOUT);
}
int16_t state = setDioIrqParams(getIrqMapped(irqFlags), getIrqMapped(irqMask));
state = setDioIrqParams(getIrqMapped(irqFlags), getIrqMapped(irqMask));
RADIOLIB_ASSERT(state);
// set buffer pointers