Add support for retrieving packet length on implicit header
This commit is contained in:
parent
419a5c6ce3
commit
c9fd5f7d3b
@ -2576,8 +2576,17 @@ void sx128x::handleDio0Rise()
|
||||
|
||||
uint8_t rxbuf[2] = {0};
|
||||
executeOpcodeRead(OP_RX_BUFFER_STATUS_8X, rxbuf, 2);
|
||||
|
||||
// If implicit header mode is enabled, read packet length as payload length instead.
|
||||
// See SX1280 datasheet v3.2, page 92
|
||||
if (_implicitHeaderMode == 0x80) {
|
||||
_rxPacketLength = _payloadLength;
|
||||
} else {
|
||||
_rxPacketLength = rxbuf[0];
|
||||
}
|
||||
|
||||
_fifo_rx_addr_ptr = rxbuf[1];
|
||||
|
||||
readBuffer(_packet, _rxPacketLength);
|
||||
|
||||
if (_onReceive) {
|
||||
|
Loading…
Reference in New Issue
Block a user