fix(llcc68): encode LoRa packet params in datasheet order
Program SetPacketParams as preamble, header type, payload length, CRC type, and IQ type. The previous order swapped packet fields, which made gateway LoRa TX frames decode as corrupted fixed-length payloads on the CH32 LLCC68 receiver.
This commit is contained in:
+2
-2
@@ -874,9 +874,9 @@ LLCC68::set_packet_params(uint16_t preamble_length, uint8_t payload_length,
|
|||||||
const uint8_t data[] = {
|
const uint8_t data[] = {
|
||||||
static_cast<uint8_t>((preamble_length >> 8) & 0xFF),
|
static_cast<uint8_t>((preamble_length >> 8) & 0xFF),
|
||||||
static_cast<uint8_t>(preamble_length & 0xFF),
|
static_cast<uint8_t>(preamble_length & 0xFF),
|
||||||
crc_type,
|
|
||||||
payload_length,
|
|
||||||
hdr_type,
|
hdr_type,
|
||||||
|
payload_length,
|
||||||
|
crc_type,
|
||||||
iq_type,
|
iq_type,
|
||||||
};
|
};
|
||||||
return write_stream(RADIOLIB_SX126X_CMD_SET_PACKET_PARAMS, data);
|
return write_stream(RADIOLIB_SX126X_CMD_SET_PACKET_PARAMS, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user