Hi All,

I was just wondering if anyone out there has had success building custom mavlink messages into QGC?  

I have been working on customizing QGC for a while but I am having trouble.  I was able to create an XML file that contains the message definition and generate the appropriate MAVLink C header files.  Unfortunately I have run into issues when I try to compile QGC from source once have added my generated headers.

Any help at all would be greatly appreciated!

Cheers,

Parker

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Great success!  

    I was finally able to add my custom mavlink packets to Qgroundcontrol.  Apparently Qgroundcontrol will not respond to any valid packets until it receives a heartbeat message from whatever device it is communicating with.  I was under the assumption that Qgroundcontrol would display any and all Mavlink messages regardless of whether a heartbeat was sent.  This theory proved to be very wrong :/

    • Hi Parker, your post is very interesting for me because i'm currently doing the exact same thing.

      I communicate a GCS with an embedded device.

      I would like to know, how have been able to send a heartbeat message to the GCS from the embedded device. Do you create a thread (or process) for receiving and sending or did you use the simulation method SITL(http://dev.ardupilot.com/wiki/setting-up-sitl-on-linux/) I try to use this tutorial (http://qgroundcontrol.org/dev/mavlink_onboard_integration_tutorial) on sending and receiving message from the embedded device  but can't figure out how am i going to send it

      thanks in advance Parker

  • Update:  I have made some progress on this issue.  I had success getting Qgroundcontrol to compile with the inclusion of my custom mavlink message.  The issue I was running into was caused by not including the common message set in my XML definition.  Once that was fixed I was able to rebuild the application from source.  

    I am currently sending QGC mavlink packets from an embedded device connected via a serial to USB device.  QGC is receiving the data but not recognizing it as valid mavlink frames and therefore I am unable to log or plot my results.  I ended up programming my serial device to transmit heartbeat packets that I had recorded from my arducopter.  QGC had no problem recognizing these messages as mavlink in nature and displayed them properly.  I decided to then take the arducopter heartbeat frame, strip it of its CRC and use my embedded code to calculate the CRC.  Low and behold the CRC was calculated incorrectly.  

    This was at the point I learned about a little thing called the MAVLINK_CRC_EXTRA.  This little bugger gets added into the mavlink packet before the CRC is calculated.  I went back and added the crc extra byte (0x32 for a heartbeat) to the crc routine and like magic the correct checksum was produced making QGC very happy.  

    Now I am going to test whether or not QGC will accept my custom messages now that I have fixed the CRC code and added the cooresponding CRC_EXTRA...update soon

This reply was deleted.

Activity