Adding new project

Hello! Do you have some instructions how to add new project (aka arduplane) into ArduPilot?
Thanks!
-Stepan

Best thing to do is to rename ArduPlane sub directory to your new Ardu and go from there’ It’s a complex thing to do, so it’s not documented as a HowTo. Maybe you can blog your progress?

Hi! Adding new project using waf turned to be quite easy thing.

  1. Create new project directory in ArduPilot root dir.
    New dir should be on the same level as ArduPlane or ArduCopter and so on.

  2. In this directory put next 3 files:

Makefile (with one line):

include ../mk/apm.mk

Makefile.waf:

all:
        @$(MAKE) -C ../  -f Makefile.waf programGroupsName

wscript (I took its contents from ArduPlane):

#!/usr/bin/env python
# encoding: utf-8

def build(bld):
    vehicle = bld.path.name
    bld.ap_stlib(
        name=vehicle + '_libs',
        ap_vehicle=vehicle,
        ap_libraries=bld.ap_common_vehicle_libraries() + [
            #below list libraries you need in you project
            'APM_Control',
            'AP_AdvancedFailsafe',
            'AP_ADSB',
            'AP_Avoidance',
            'AP_Arming',
            'AP_Camera',
            'AP_Frsky_Telem',
            'AP_L1_Control',
            'AP_Menu',
            'AP_Navigation',
            'AP_Parachute',
            'AP_RCMapper',
            'AP_Relay',
            'AP_ServoRelayEvents',
            'AP_SpdHgtControl',
            'AP_TECS',
            'AP_InertialNav',
            'AC_WPNav',
            'AC_AttitudeControl',
            'AP_Motors',
            'AC_PID',
            'AC_Fence',
            'AC_Avoidance'
        ],
        use='mavlink',
    )
    bld.ap_program(
        program_name='progamName',
        program_groups=['bin', 'programGroupsName'],
        use=vehicle + '_libs',
    )

As programName you can use for example “ArduMyPlane” and “myplane” as programGroupsName.

Also:
Don’t forget to put at least on .cpp file. Otherwise waf will fail to build anything from ardupilot directory (yes anything, even working projects).
Well that’s it.

Afterwards you can build your project:

$ cd $ArduPilotDir
$ waf --targets bin/progamName
# or if you use ArduMyPlane
$ waf --targets bin/ArduMyPlane

btw, what is the good place for such blog articles?
Thanks!

Right here in the forum there is a Blog category.