MAVLink Custom Message - Where is MAVLINK_DIALECT?

Dear PX4 Friends,

I am trying to create a custom MAVlink message. I follow instructions on defining-custom-mavlink-messages. These instructions say (quote):

There are are number of XML dialect files in /mavlink/messages/1.0/. The dialect that is built is specified using the variable MAVLINK_DIALECT in /src/modules/mavlink/CMakeLists.txt; by default this is development.xml. The files are generated into the build directory: /build/<build target>/mavlink/

I am not able to find the variable MAVLINK_DIALECT in CMakeList.txt. That string does seem to exist in that file.

Any hint greatly appreciated.
Thanks in advance :slight_smile:

Hi!
You might be able to configure the MAVLINK_DIALECT using Kconfig:

You can set it for you board in default.px4board, e.g. for SITL:

You should also be able to set it using menuconfig which can edit the Kconfig options but I couldn’t find just yet.

Thanks for your help. I will try.

Hi friend , did you custom mavlink message successfully? I tried to define a message , but I couldn’t capture data on the serial port. Do you have any tips?

You need to make sure the custom dialect is generated and built for all components, so probably PX4 as well as the QGC (or MAVSDK, MAVROS) or whatever you’re using on the ground.

Hii @DaShen96…

Have you created custom mavlink message??

I tried to create a custom message. But it didn’t worked. Could you please guide me to create a custom mavlink message??