From 5d89dfc475eb603e05bf52cce6bae42cd3f2181e Mon Sep 17 00:00:00 2001 From: dernasherbrezon Date: Sat, 27 Jul 2024 14:30:01 +0100 Subject: [PATCH] fix sending payload with address --- src/sx127x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sx127x.c b/src/sx127x.c index 37f58d8..772210b 100644 --- a/src/sx127x.c +++ b/src/sx127x.c @@ -909,11 +909,11 @@ int sx127x_fsk_ook_tx_set_for_transmission_with_address(uint8_t *data, uint16_t return SX127X_ERR_INVALID_ARG; } uint16_t offset = 0; - uint16_t packet_length = data_length; + uint16_t packet_length = data_length + 1; if (device->fsk_ook_format == SX127X_VARIABLE) { - device->packet[offset] = (uint8_t) (data_length + 1); + device->packet[offset] = (uint8_t) packet_length; offset++; - packet_length = data_length + 1; + packet_length++; } device->packet[offset] = address_to; offset++;