Creating Custom MAVLink message


I’m trying to create a custom MAVLink message by following the Adding a new MAVLink Message page.
I’m stuck at step #4 which says add functions to the main vehicle code to handle sending/receiving the command to/from the GCS. A bit confused as what the functions look like and the procedure following it?
Want to send some float values through the MAVLink message.
I’m new to MAVLink and any kind of help is appreciated.


Maybe this Mav message is ideal for you so:
Using this, you will have no need to touch mavlink code nor your GCS side, you will be able to see your message at MAVLink Inspector that most popular GCS supports.

Search the code for this message, probably somewhere you will see its usage and it is pretty straightforward, simply create a function to handle sending this data where appropriate and you are ready to go.

Let me know if you need further advice.


Thank you for the reply. My issue is solved.

Used a similar MAVLink message as given in How to send a string from a PC to RaspberryPI with telemetry over Pixhawk

1 Like


Asking from a scalability point of view, I want to communicate with 2 different components from a single ground station (single telemetry) using system and component ids. How should I do it as this MAVLink message does not contain the id fields.


Nice to hear man!

Unfortunately, I don’t know… I never tried this kind of architecture.