pub fn split_frames(buf: &[u8]) -> Vec<&[u8]>Expand description
Split a buffer of back-to-back MAVLink frames into whole frames.
Several frames are batched into one radio datagram, because the auxiliary lane’s loss is driven by packets per second rather than bytes per second: measured on a live link, the same byte rate lost 15% as many small datagrams and 0% as a few large ones. Batching preserves the frames that a packet-rate cap would otherwise shed.
Stops at the first byte that does not begin a complete, recognisable frame and returns what was whole, so a truncated tail is dropped rather than mis-split into garbage.