[SX128x] Use length from startReceive in implicit header mode

master
jgromes 2024-12-15 15:53:06 +01:00
rodzic 0cc72c8310
commit ded508cc25
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -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) {