[SX126x] Use length from startReceive in implicit header mode

master
jgromes 2024-12-15 15:53:13 +01:00
rodzic ded508cc25
commit 75f087b5c2
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -641,7 +641,12 @@ int16_t SX126x::startReceive() {
}
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);
RADIOLIB_ASSERT(state);