fixed transmit frame length problem

This commit is contained in:
adrcs 2025-02-05 19:24:48 -07:00 committed by GitHub
parent 7587e390c0
commit 65501e9489
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,10 +299,10 @@ void Frame_Txtask_exec(void)
*/ */
tFrame = dequeFrame(&txQueue); tFrame = dequeFrame(&txQueue);
uint8_t *rawFrame = (uint8_t *)rawTxFrame;
if(tFrame != NULL) { if(tFrame != NULL) {
frameLen = tFrame->length; frameLen = tFrame->length;
uint8_t *rawFrame = (uint8_t *)rawTxFrame;
/* /*
* Build the raw frame bytes: see IP400_FRAME struct * Build the raw frame bytes: see IP400_FRAME struct
@ -337,7 +337,8 @@ void Frame_Txtask_exec(void)
return; // nothing to send... return; // nothing to send...
} }
HAL_MRSubG_PktBasicSetPayloadLength(frameLen); int pktLen = rawFrame - rawTxFrame;
HAL_MRSubG_PktBasicSetPayloadLength(frameLen + pktLen);
// abort the current rx operation // abort the current rx operation
if(radioCmd == CMD_RX) { if(radioCmd == CMD_RX) {