[SX126x] Fixed packet length not restored after transmission (#298)
This commit is contained in:
parent
ba71e92eb1
commit
e482c7e554
1 changed files with 12 additions and 1 deletions
|
@ -570,6 +570,17 @@ int16_t SX126x::startReceiveCommon() {
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// restore original packet length
|
||||||
|
int16_t state = ERR_NONE;
|
||||||
|
uint8_t modem = getPacketType();
|
||||||
|
if(modem == SX126X_PACKET_TYPE_LORA) {
|
||||||
|
state = setPacketParams(_preambleLength, _crcType, _implicitLen, _headerType);
|
||||||
|
} else if(modem == SX126X_PACKET_TYPE_GFSK) {
|
||||||
|
state = setPacketParamsFSK(_preambleLengthFSK, _crcTypeFSK, _syncWordLength, _addrComp, _whitening, _packetType);
|
||||||
|
} else {
|
||||||
|
return(ERR_UNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
return(state);
|
return(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue