FMU link to companion computer

Based on the MAVLink Messaging tutorial (https://dev.px4.io/v1.10/en/middleware/mavlink.html) I followed all the step, but when I compile the code I get the error:

error: ‘MavlinkOrbSubscription’ does not name a type in mavlin_messages.c.

Searching I found that the MavlinkOrbSubscription class is included in the mavlink_orb_subscription.h file. But, I do not have a such file in all the project. I installed the PX4 using:

$ git clone --recursive https://github.com/PX4/Firmware.git px4-firmware

Please, do you have a solution? Thank you very much!

Dobrea Dan.

It appears the example has not been updated.

You need to file an issue. If you look at the 1.10 version of mavlink_messages.cpp is used there, but not on master.

If you switch to the tag 1.10.1 your .h file is there, but not on master.

1 Like

Thanks jimdgit! If I understand correctly in the last release the file “mavlink_orb_subscription.h” does not exist. But, if I will go to the 1.10.1 release I will find the file.

OK! Right now I do not understand complitly the git … I will try to go to the 1.10.1 release. I will study how, right now I do’t know. In mean time I uninstalled all the PX4 and installed again, I thought it was a problem in my instalation.

Thank you!

If you do this it will switch to that tag:

Also google “How To Checkout Git Tags”

Thanks! Last night I play a little bit with github and I was able to learn how to search a file into different version. Right now, I try to understand how to clone locally, on my linux machine, a previous version of the PX4.

Best regards!

Well you could just download the zip file for that tag.

I used:

git clone --recursive -b v1.10.2 https://github.com/PX4/Firmware.git px4-firmware_v1.10.2

but when I build PX4 v1.10.2 I get errors. Now I will tray with 1.10.1.