How to build my own scripts


I’ve been running Arducopter 3.6 on my Intel Aero and I was wondering how to build a cpp script that I created. I have built the example codes using the instructions on the wiki but I don’t see instructions on building one’s own scripts using waf. Any help would be greatly appreciated

I guess you’re looking to run another small cpp file on the intel aero. Perhaps @lucasdemarchi might have some advice. I worry a little though that you’re expecting that a stand-alone .cpp program can access various parts of ArduPilot like the AHRS, IMU, etc but I think that is not so simple because that stand-alone program is a separate process from ArduPilot and so it won’t be able to access the ardupilot processes memory or variables, etc.

All I intend to do is modify the GPS_UBLOX_passthrough example slightly to have it print the raw GPS data to a file instead of to the console. I have the code written but I just can’t build it.

./waf examples

This should build all examples.

Thanks for the advice. I figured out how to do it.

1 Like

can you please help me with building the custom example scripts. I modified the UART_test example slightly and trying to print something to the console. ./waf examples doesn’t build my new example file.