From 833d9c0b8cfa3aa549db3f02ee9e9f0128ceed57 Mon Sep 17 00:00:00 2001 From: Pawel Jalocha Date: Sat, 24 Oct 2020 00:42:03 +0100 Subject: [PATCH] Fix bug on decision to send 16 or 20 byte long packet --- main/rf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/rf.cpp b/main/rf.cpp index 35aef2d..de056ea 100644 --- a/main/rf.cpp +++ b/main/rf.cpp @@ -495,7 +495,7 @@ extern "C" if(PktData) // if there is a packet to transmit { OGN1_Packet *OGN = (OGN1_Packet *)PktData; OGN->Dewhiten(); uint8_t *TxPacket; - bool Short = !OGN->Header.NonPos && OGN->Header.AddrType==3 && OGN->Header.Address!=getUniqueAddress(); + bool Short = !OGN->Header.NonPos && OGN->Header.AddrType==3 && OGN->Header.Address==(uint32_t)(getUniqueAddress()&0x00FFFFFF); if(Short) { TxPktLen=WANdev.getDataPacket(&TxPacket, PktData+4, 16, 1, ((RX_Random>>16)&0xF)==0x8 ); } else