From 1b443c59718f1e3ffd0ff300d58b74f02f3918a9 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Sat, 12 Oct 2024 12:45:20 +0100 Subject: [PATCH] Fix edge case in transmission handling --- RNode_Firmware_CE.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RNode_Firmware_CE.ino b/RNode_Firmware_CE.ino index 079373f..5a83845 100644 --- a/RNode_Firmware_CE.ino +++ b/RNode_Firmware_CE.ino @@ -538,7 +538,9 @@ void transmit(RadioInterface* radio, uint16_t size) { written++; - if (written == 255) { + // Only start a new packet if this is a split packet and it has + // exceeded the length of a single packet + if (written == 255 && header & 0x0F) { radio->endPacket(); radio->addAirtime(written); radio->beginPacket(); radio->write(header);