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: https://mavlink.io/en/messages/common.html#NAMED_VALUE_FLOAT
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.
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.