From 20719e23fdb5f766d84b611405abf3ca0d80be21 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Tue, 27 May 2014 14:43:33 +0900 Subject: [PATCH] Copter: enable PARACHUTE and RALLY for all but APM --- ArduCopter/APM_Config.h | 8 +++++--- ArduCopter/config.h | 18 ++++-------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/ArduCopter/APM_Config.h b/ArduCopter/APM_Config.h index d992245d08..28b96b7b9d 100644 --- a/ArduCopter/APM_Config.h +++ b/ArduCopter/APM_Config.h @@ -30,12 +30,14 @@ //#define CONFIG_SONAR DISABLED // disable sonar to save 1k of flash //#define HYBRID_ENABLED DISABLED // disable hybrid flight mode to save 4.5k of flash -// features below are disabled by default -//#define OPTFLOW ENABLED // enable optical flow sensor and OF_LOITER flight mode at a cost of 5K of flash space +// features below are disabled by default on APM (but enabled on Pixhawk) //#define AC_RALLY ENABLED // disable rally points to save 2k of flash, and also frees rally point EEPROM for more mission commands +//#define PARACHUTE ENABLED // enable parachute release at a cost of 1k of flash + +// features below are disabled by default on all boards +//#define OPTFLOW ENABLED // enable optical flow sensor and OF_LOITER flight mode at a cost of 5K of flash space //#define SPRAYER ENABLED // enable the crop sprayer feature (two ESC controlled pumps the speed of which depends upon the vehicle's horizontal velocity) //#define EPM_ENABLED ENABLED // enable epm cargo gripper costs 500bytes of flash -//#define PARACHUTE ENABLED // enable parachute release at a cost of 1k of flash // other settings //#define THROTTLE_IN_DEADBAND 100 // redefine size of throttle deadband in pwm (0 ~ 1000) diff --git a/ArduCopter/config.h b/ArduCopter/config.h index fbb22410f3..13b98fb594 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -59,6 +59,8 @@ # define CONFIG_IMU_TYPE CONFIG_IMU_MPU6000 # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN # define MAGNETOMETER ENABLED + # define PARACHUTE DISABLED + # define AC_RALLY DISABLED # ifdef APM2_BETA_HARDWARE # define CONFIG_BARO AP_BARO_BMP085 # else // APM2 Production Hardware (default) @@ -69,13 +71,11 @@ # define CONFIG_IMU_TYPE CONFIG_IMU_SITL # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN # define MAGNETOMETER ENABLED - # define OPTFLOW DISABLED #elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 # define CONFIG_IMU_TYPE CONFIG_IMU_PX4 # define CONFIG_BARO AP_BARO_PX4 # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN # define MAGNETOMETER ENABLED - # define OPTFLOW DISABLED #elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE # define CONFIG_IMU_TYPE CONFIG_IMU_FLYMAPLE # define CONFIG_BARO AP_BARO_BMP085 @@ -83,7 +83,6 @@ # define CONFIG_ADC DISABLED # define MAGNETOMETER ENABLED # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN - # define OPTFLOW DISABLED #elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX # define CONFIG_IMU_TYPE CONFIG_IMU_L3G4200D # define CONFIG_BARO AP_BARO_BMP085 @@ -91,13 +90,11 @@ # define CONFIG_ADC DISABLED # define MAGNETOMETER ENABLED # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN - # define OPTFLOW DISABLED #elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN # define CONFIG_IMU_TYPE CONFIG_IMU_VRBRAIN # define CONFIG_BARO AP_BARO_VRBRAIN # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN # define MAGNETOMETER ENABLED - # define OPTFLOW DISABLED #endif #if HAL_CPU_CLASS < HAL_CPU_CLASS_75 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL @@ -144,13 +141,6 @@ # define RATE_YAW_I 0.015f #endif - -// optical flow doesn't work in SITL yet -#ifdef DESKTOP_BUILD -# define OPTFLOW DISABLED -#endif - - ////////////////////////////////////////////////////////////////////////////// // IMU Selection // @@ -413,7 +403,7 @@ ////////////////////////////////////////////////////////////////////////////// // Parachute release #ifndef PARACHUTE - # define PARACHUTE DISABLED + # define PARACHUTE ENABLED #endif ////////////////////////////////////////////////////////////////////////////// @@ -753,7 +743,7 @@ #endif #ifndef AC_RALLY - #define AC_RALLY DISABLED + #define AC_RALLY ENABLED #endif //////////////////////////////////////////////////////////////////////////////