MAVLink headers not being generated for new message

Hello,

I am having some trouble setting up a new MAVLink message. I edited the common.xml file as described in the documentation, but when I try to build the PX4 stack, I am getting errors that parameters such as MAVLINK_MSG_ID_MY_MESSAGE does not exist. An when I look in the message_definitions folder, my new message does not appear in the list of headers.

How do I go about generating the header file for my new message?

Perhaps as an aside, the page that is supposed to tell me how to do this is not functioning. here

Thanks,
Jon

1 Like

Once you added the new mavlink message to the mavlink repo you need to execute the python script mavgenerate.py. If you put your message in common.xml you need to generate the common headers (and maybe also standard). The common folder in the Firmware (Firmware/mavlink/include/mavlink/v2.0/common) needs to be replaced with the newly generated common folder.
Let me know if that works :slight_smile:

Yep, that worked great. Thanks!