From 65501e9489b3c74e634936187eb4238c0f073c51 Mon Sep 17 00:00:00 2001 From: adrcs Date: Wed, 5 Feb 2025 19:24:48 -0700 Subject: [PATCH] fixed transmit frame length problem --- code/IP400/Src/frame.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/IP400/Src/frame.c b/code/IP400/Src/frame.c index 4c7751b..a8e96e7 100644 --- a/code/IP400/Src/frame.c +++ b/code/IP400/Src/frame.c @@ -299,10 +299,10 @@ void Frame_Txtask_exec(void) */ tFrame = dequeFrame(&txQueue); + uint8_t *rawFrame = (uint8_t *)rawTxFrame; if(tFrame != NULL) { frameLen = tFrame->length; - uint8_t *rawFrame = (uint8_t *)rawTxFrame; /* * Build the raw frame bytes: see IP400_FRAME struct @@ -337,7 +337,8 @@ void Frame_Txtask_exec(void) return; // nothing to send... } - HAL_MRSubG_PktBasicSetPayloadLength(frameLen); + int pktLen = rawFrame - rawTxFrame; + HAL_MRSubG_PktBasicSetPayloadLength(frameLen + pktLen); // abort the current rx operation if(radioCmd == CMD_RX) {