Hello
I would like to add a new library to the ardupilot library.
However, I do not know the correct procedure to add libraries.
I have created a new “AC_MYPID” folder in the library directory.
After that, I made AC_MYPID.cpp and AC_MYPID.h
Hi,
I am trying to do the exact same thing, but I’m building ArduCopter with Make. Can anyone let me know what needs to be done to include a new library in the build process? I would like to use it on the Pixhawk target as well, so I want to just add it to all make targets. I couldn’t locate a make file which adds the libraries, can someone help?
Hi! I also try to add a library to ArduCopter (using version 3.6.11). So I added the files to make.inc and wscript, as @ejngnng suggested it.
My new library is called AC_GroundProfileAcquisition, and I put the files in libraries/AC_GroundProfileAcquisition. There I have three files so far:
AC_GroundProfileAcquisition.h, which only consists of #include <AC_GroundProfileAcquisition/GroundProfileAcquisition.h>
GroundProfileAcquisition.h with the declarations
GroundProfileAcquisition.cpp with the definitions
I found this structure in other ArduCopter libraries, such as AP_RangeFinder.
When building it with waf, I get a strange error:
Dependency /home/crowdsweeper/git/ardupilot-Copter_3_6_11-AltCS/ardupilot/libraries/GroundProfileAcquisition.h for
{task 139665330699504: cxx AC_Loiter.cpp -> AC_Loiter.cpp.0.o} is missing: check the task declaration and the build order!
I didn’t use any files of my new library in AC_Loiter
The compiler goes on (I will leave out the python call stack of waf) with a Build failed
[…]
strange thing is, I never put an #include "GroundProfileAcquisition.h", but rather <AC_GroundProfileAcquisition/GroundProfileAcquisition.h>.
How can I tell waf to use the correct path?