how to read mavlink package .. is it ok to do it on my way ?

59 views
Skip to first unread message

tydro...@gmail.com

unread,
Oct 25, 2016, 2:56:31 PM10/25/16
to drones-discuss

 i reading about MAVlink and i try to read packages from pixhawk fly controller. 

I thought of another way to make the call and i want to know from this discussions readers if its ok and what are you think 

On my reader .. i read the two first byte from the pixhawk. 

The second byte need to be the PAYLOAD length --> so new i know that i need to read the 4 bytes of the header  + PAYLOAD length bytes + 2 chcksub bytes. 

So after reading the PAYLOAD length i define a byte array -> size is    ( PAYLOAD.length + 4 + 2 ) and read from the serial to this buffer. 

Is it ok to do it ? 


Reply all
Reply to author
Forward
0 new messages