|
|
|
@ -109,7 +109,16 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
@@ -109,7 +109,16 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [
|
|
|
|
|
'AP_FETtecOneWire', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
def get_legacy_defines(sketch_name): |
|
|
|
|
def get_legacy_defines(sketch_name, bld): |
|
|
|
|
# If we are building heli, we adjust the build directory define so that |
|
|
|
|
# we do not need to actually split heli and copter directories |
|
|
|
|
if bld.cmd == 'heli' or 'heli' in bld.targets: |
|
|
|
|
return [ |
|
|
|
|
'APM_BUILD_DIRECTORY=APM_BUILD_Heli', |
|
|
|
|
'SKETCH="' + sketch_name + '"', |
|
|
|
|
'SKETCHNAME="' + sketch_name + '"', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
return [ |
|
|
|
|
'APM_BUILD_DIRECTORY=APM_BUILD_' + sketch_name, |
|
|
|
|
'SKETCH="' + sketch_name + '"', |
|
|
|
@ -253,7 +262,7 @@ def ap_program(bld,
@@ -253,7 +262,7 @@ def ap_program(bld,
|
|
|
|
|
program_name = bld.path.name |
|
|
|
|
|
|
|
|
|
if use_legacy_defines: |
|
|
|
|
kw['defines'].extend(get_legacy_defines(bld.path.name)) |
|
|
|
|
kw['defines'].extend(get_legacy_defines(bld.path.name, bld)) |
|
|
|
|
|
|
|
|
|
kw['features'] = kw.get('features', []) + bld.env.AP_PROGRAM_FEATURES |
|
|
|
|
|
|
|
|
|