.waf compiling ardupilot

Hello everyone. I need to use a custom firmware on my copter with px4 flow. So I’m compiling the firmware with .waf usung ubuntu. (I can’t do it in the online configurator, because I need to change the code in several files). But when I upload the firmware on flight controller, the optical flow parameters are missing, so, as I understood, there is not enough memory for them

The main question is: how can I NOT INCLUDE some parameters while compiling with .waf?

Check the hwdef file and it’s includes for your hardware. Most optional modules are included/excluded there

If I add one line of code here: “define AP_OPTICALFLOW_ENABLED 1”
If I change the “define AP_OPTICALFLOW_ENABLED 0” to “define AP_OPTICALFLOW_ENABLED 1” in hwdef.h it is changed back and the compilation crashes with many errors.

change the define from 0 to 1 in hwdef/include/minimze_fpv_osd.inc
./waf clean
./waf build

1 Like

Now it’s working. Thank you a lot for your help!!!