[SX126x] Use length from startReceive in implicit header mode
This commit is contained in:
parent
ded508cc25
commit
75f087b5c2
1 changed files with 6 additions and 1 deletions
|
@ -641,7 +641,12 @@ int16_t SX126x::startReceive() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t SX126x::startReceive(uint32_t timeout, RadioLibIrqFlags_t irqFlags, RadioLibIrqFlags_t irqMask, size_t len) {
|
int16_t SX126x::startReceive(uint32_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_SX126X_LORA_HEADER_IMPLICIT) && (len != 0)) {
|
||||||
|
this->implicitLen = len;
|
||||||
|
}
|
||||||
|
|
||||||
int16_t state = startReceiveCommon(timeout, irqFlags, irqMask);
|
int16_t state = startReceiveCommon(timeout, irqFlags, irqMask);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue