[SX128x] Use length from startReceive in implicit header mode
This commit is contained in:
parent
0cc72c8310
commit
ded508cc25
1 changed files with 5 additions and 1 deletions
|
@ -589,7 +589,11 @@ int16_t SX128x::startReceive() {
|
|||
}
|
||||
|
||||
int16_t SX128x::startReceive(uint16_t timeout, RadioLibIrqFlags_t irqFlags, RadioLibIrqFlags_t irqMask, size_t len) {
|
||||
(void)len;
|
||||
// in implicit header mode, use the provided length if it is nonzero
|
||||
// otherwise we trust the user has previously set the payload length manually
|
||||
if((this->headerType == RADIOLIB_SX128X_LORA_HEADER_IMPLICIT) && (len != 0)) {
|
||||
this->payloadLen = len;
|
||||
}
|
||||
|
||||
// check active modem
|
||||
if(getPacketType() == RADIOLIB_SX128X_PACKET_TYPE_RANGING) {
|
||||
|
|
Loading…
Add table
Reference in a new issue