From d7f77aec9357e5a89569f0849e033230bf099ffe Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Sat, 26 Nov 2011 22:09:14 -0800 Subject: [PATCH] ArduCopter & ArduPlane: Added support for apm2beta build via APM2_BETA_HARDWARE define * This enables the BMA085 driver for compatibility with beta boards. * The CLI_SLIDER_ENABLED=DISABLED line does not need to be in the makefile. config.h takes care of this default. --- ArduCopter/Makefile | 5 ++++- ArduCopter/config.h | 4 ++++ ArduPlane/Makefile | 3 +++ ArduPlane/config.h | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ArduCopter/Makefile b/ArduCopter/Makefile index ff51071f54..18ab179cc1 100644 --- a/ArduCopter/Makefile +++ b/ArduCopter/Makefile @@ -19,7 +19,10 @@ heli: make -f Makefile EXTRAFLAGS="-DFRAME_CONFIG=HELI_FRAME" apm2: - make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2 -DCLI_SLIDER_ENABLED=DISABLED" + make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2" + +apm2beta: + make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2 -DAPM2_BETA_HARDWARE" mavlink10: make -f Makefile EXTRAFLAGS="-DMAVLINK10" diff --git a/ArduCopter/config.h b/ArduCopter/config.h index ac4e692f13..7a8d61480d 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -52,7 +52,11 @@ # define CONFIG_RELAY DISABLED # define MAG_ORIENTATION AP_COMPASS_APM2_SHIELD # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN +# ifdef APM2_BETA_HARDWARE +# define CONFIG_BARO AP_BARO_BMP085 +# else // APM2 Production Hardware (default) # define CONFIG_BARO AP_BARO_MS5611 +# endif #endif diff --git a/ArduPlane/Makefile b/ArduPlane/Makefile index bd70435fd6..8a26a019ef 100644 --- a/ArduPlane/Makefile +++ b/ArduPlane/Makefile @@ -21,6 +21,9 @@ heli: apm2: make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2" +apm2beta: + make -f Makefile EXTRAFLAGS="-DCONFIG_APM_HARDWARE=APM_HARDWARE_APM2 -DAPM2_BETA_HARDWARE" + mavlink10: make -f Makefile EXTRAFLAGS="-DMAVLINK10" diff --git a/ArduPlane/config.h b/ArduPlane/config.h index ec50f2d29c..2acdcb1e18 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -60,9 +60,14 @@ # define CONFIG_RELAY DISABLED # define MAG_ORIENTATION AP_COMPASS_APM2_SHIELD # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN +# ifdef APM2_BETA_HARDWARE +# define CONFIG_BARO AP_BARO_BMP085 +# else // APM2 Production Hardware (default) # define CONFIG_BARO AP_BARO_MS5611 +# endif #endif +////////////////////////////////////////////////////////////////////////////// // LED and IO Pins // #if CONFIG_APM_HARDWARE == APM_HARDWARE_APM1