AP_Network: mavlink packetise requires mavlink

This commit is contained in:
Tom Pittenger 2023-11-28 13:20:11 -08:00 committed by Peter Barker
parent 2650137e8c
commit f72dd8cc89
1 changed files with 2 additions and 0 deletions

View File

@ -353,9 +353,11 @@ bool AP_Networking::Port::send_receive(void)
// handle outgoing packets
uint32_t available = writebuffer->available();
available = MIN(300U, available);
#if HAL_GCS_ENABLED
if (packetise) {
available = mavlink_packetise(*writebuffer, available);
}
#endif
if (available > 0) {
uint8_t buf[available];
auto n = writebuffer->peekbytes(buf, available);