2011-03-19 07:20:11 -03:00
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
2010-12-19 12:40:33 -04:00
|
|
|
//
|
2012-01-01 15:44:51 -04:00
|
|
|
#ifndef __ARDUCOPTER_CONFIG_H__
|
|
|
|
#define __ARDUCOPTER_CONFIG_H__
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
|
|
//
|
|
|
|
// DO NOT EDIT this file to adjust your configuration. Create your own
|
|
|
|
// APM_Config.h and use APM_Config.h.example as a reference.
|
|
|
|
//
|
|
|
|
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
|
|
|
///
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Default and automatic configuration details.
|
|
|
|
//
|
|
|
|
// Notes for maintainers:
|
|
|
|
//
|
|
|
|
// - Try to keep this file organised in the same order as APM_Config.h.example
|
|
|
|
//
|
|
|
|
#include "defines.h"
|
|
|
|
|
|
|
|
///
|
|
|
|
/// DO NOT EDIT THIS INCLUDE - if you want to make a local change, make that
|
|
|
|
/// change in your local copy of APM_Config.h.
|
2011-02-19 22:03:01 -04:00
|
|
|
///
|
2012-04-18 16:16:02 -03:00
|
|
|
#ifdef USE_CMAKE_APM_CONFIG
|
2012-08-21 23:19:50 -03:00
|
|
|
#include "APM_Config_cmake.h" // <== Prefer cmake config if it exists
|
2012-04-18 16:16:02 -03:00
|
|
|
#else
|
2012-08-21 23:19:50 -03:00
|
|
|
#include "APM_Config.h" // <== THIS INCLUDE, DO NOT EDIT IT. EVER.
|
2012-04-18 16:16:02 -03:00
|
|
|
#endif
|
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HARDWARE CONFIGURATION AND CONNECTIONS
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-12-13 19:27:42 -04:00
|
|
|
#ifdef CONFIG_APM_HARDWARE
|
|
|
|
#error CONFIG_APM_HARDWARE option is deprecated! use CONFIG_HAL_BOARD instead
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
2012-12-13 20:32:36 -04:00
|
|
|
#ifndef CONFIG_HAL_BOARD
|
|
|
|
#error CONFIG_HAL_BOARD must be defined to build ArduCopter
|
|
|
|
#endif
|
2013-04-05 10:48:10 -03:00
|
|
|
|
|
|
|
#ifdef __AVR_ATmega1280__
|
|
|
|
#error ATmega1280 is not supported
|
|
|
|
#endif
|
2011-11-12 23:39:41 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2011-11-25 19:11:25 -04:00
|
|
|
// APM2 HARDWARE DEFAULTS
|
2011-11-12 23:39:41 -04:00
|
|
|
//
|
|
|
|
|
2012-12-13 19:27:42 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
2012-08-21 23:19:50 -03:00
|
|
|
# define CONFIG_IMU_TYPE CONFIG_IMU_MPU6000
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
|
|
|
# define MAGNETOMETER ENABLED
|
|
|
|
# ifdef APM2_BETA_HARDWARE
|
|
|
|
# define CONFIG_BARO AP_BARO_BMP085
|
|
|
|
# else // APM2 Production Hardware (default)
|
2013-01-03 14:21:17 -04:00
|
|
|
# define CONFIG_BARO AP_BARO_MS5611
|
2013-01-08 14:25:51 -04:00
|
|
|
# define CONFIG_MS5611_SERIAL AP_BARO_MS5611_SPI
|
2012-08-21 23:19:50 -03:00
|
|
|
# endif
|
2012-12-18 06:15:11 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
|
|
|
# define CONFIG_IMU_TYPE CONFIG_IMU_SITL
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
|
|
|
# define MAGNETOMETER ENABLED
|
2013-01-02 07:08:40 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
2013-01-05 05:38:19 -04:00
|
|
|
# define CONFIG_IMU_TYPE CONFIG_IMU_PX4
|
|
|
|
# define CONFIG_BARO AP_BARO_PX4
|
2013-01-02 07:08:40 -04:00
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
|
|
|
# define MAGNETOMETER ENABLED
|
2013-09-23 04:06:51 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
|
|
|
|
# define CONFIG_IMU_TYPE CONFIG_IMU_FLYMAPLE
|
|
|
|
# define CONFIG_BARO AP_BARO_BMP085
|
|
|
|
# define CONFIG_COMPASS AP_COMPASS_HMC5843
|
|
|
|
# define CONFIG_ADC DISABLED
|
|
|
|
# define MAGNETOMETER ENABLED
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
2013-09-28 08:46:14 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
2013-10-07 21:49:43 -03:00
|
|
|
# define CONFIG_IMU_TYPE CONFIG_IMU_L3G4200D
|
2013-09-28 08:46:14 -03:00
|
|
|
# define CONFIG_BARO AP_BARO_BMP085
|
|
|
|
# define CONFIG_COMPASS AP_COMPASS_HMC5843
|
|
|
|
# define CONFIG_ADC DISABLED
|
|
|
|
# define MAGNETOMETER ENABLED
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FRAME_CONFIG
|
2011-02-19 22:03:01 -04:00
|
|
|
//
|
2010-12-19 12:40:33 -04:00
|
|
|
#ifndef FRAME_CONFIG
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FRAME_CONFIG QUAD_FRAME
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-05-18 20:38:24 -03:00
|
|
|
#ifndef FRAME_ORIENTATION
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FRAME_ORIENTATION X_FRAME
|
2011-05-18 20:38:24 -03:00
|
|
|
#endif
|
2012-08-09 20:48:38 -03:00
|
|
|
#ifndef TOY_EDF
|
2012-08-21 23:19:50 -03:00
|
|
|
# define TOY_EDF DISABLED
|
2012-08-09 20:48:38 -03:00
|
|
|
#endif
|
2012-08-16 19:40:28 -03:00
|
|
|
#ifndef TOY_MIXER
|
2012-08-21 23:19:50 -03:00
|
|
|
# define TOY_MIXER TOY_LINEAR_MIXER
|
2012-08-16 19:40:28 -03:00
|
|
|
#endif
|
|
|
|
|
2012-12-08 15:49:38 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
2013-08-28 01:05:01 -03:00
|
|
|
// TradHeli defaults
|
2012-12-08 15:49:38 -04:00
|
|
|
#if FRAME_CONFIG == HELI_FRAME
|
|
|
|
# define RC_FAST_SPEED 125
|
2013-04-20 03:36:24 -03:00
|
|
|
# define WP_YAW_BEHAVIOR_DEFAULT YAW_LOOK_AT_HOME
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_INTEGRATOR_LEAK_RATE 0.02f
|
2012-12-08 15:49:38 -04:00
|
|
|
# define RATE_ROLL_D 0
|
|
|
|
# define RATE_PITCH_D 0
|
|
|
|
# define HELI_PITCH_FF 0
|
|
|
|
# define HELI_ROLL_FF 0
|
|
|
|
# define HELI_YAW_FF 0
|
2012-12-08 21:41:05 -04:00
|
|
|
# define STABILIZE_THROTTLE THROTTLE_MANUAL
|
2012-12-13 15:54:14 -04:00
|
|
|
# define MPU6K_FILTER 10
|
2012-12-08 21:41:05 -04:00
|
|
|
#endif
|
2012-12-08 15:49:38 -04:00
|
|
|
|
2013-08-28 01:05:01 -03:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Y6 defaults
|
|
|
|
#if FRAME_CONFIG == Y6_FRAME
|
|
|
|
# define RATE_ROLL_P 0.1f
|
|
|
|
# define RATE_ROLL_D 0.006f
|
|
|
|
# define RATE_PITCH_P 0.1f
|
|
|
|
# define RATE_PITCH_D 0.006f
|
|
|
|
# define RATE_YAW_P 0.150f
|
|
|
|
# define RATE_YAW_I 0.015f
|
|
|
|
#endif
|
|
|
|
|
2012-12-08 15:49:38 -04:00
|
|
|
|
2012-11-18 18:04:03 -04:00
|
|
|
// optical flow doesn't work in SITL yet
|
|
|
|
#ifdef DESKTOP_BUILD
|
|
|
|
# define OPTFLOW DISABLED
|
|
|
|
#endif
|
2012-08-09 20:48:38 -03:00
|
|
|
|
2011-05-18 20:38:24 -03:00
|
|
|
|
2011-11-12 23:39:41 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// IMU Selection
|
|
|
|
//
|
|
|
|
#ifndef CONFIG_IMU_TYPE
|
2012-08-21 23:19:50 -03:00
|
|
|
# define CONFIG_IMU_TYPE CONFIG_IMU_OILPAN
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
2012-12-13 15:54:14 -04:00
|
|
|
#ifndef MPU6K_FILTER
|
|
|
|
# define MPU6K_FILTER MPU6K_DEFAULT_FILTER
|
|
|
|
#endif
|
2011-11-12 23:39:41 -04:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// ADC Enable - used to eliminate for systems which don't have ADC.
|
|
|
|
//
|
|
|
|
#ifndef CONFIG_ADC
|
2012-08-21 23:19:50 -03:00
|
|
|
# if CONFIG_IMU_TYPE == CONFIG_IMU_OILPAN
|
|
|
|
# define CONFIG_ADC ENABLED
|
|
|
|
# else
|
|
|
|
# define CONFIG_ADC DISABLED
|
|
|
|
# endif
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
2010-12-19 12:40:33 -04:00
|
|
|
|
2011-10-12 02:20:23 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// PWM control
|
2012-09-13 09:31:13 -03:00
|
|
|
// default RC speed in Hz
|
2012-03-02 02:24:44 -04:00
|
|
|
#ifndef RC_FAST_SPEED
|
2012-12-08 15:49:38 -04:00
|
|
|
# define RC_FAST_SPEED 490
|
2012-03-02 02:24:44 -04:00
|
|
|
#endif
|
|
|
|
|
2012-05-15 11:07:03 -03:00
|
|
|
////////////////////////////////////////////////////////
|
2011-11-12 23:39:41 -04:00
|
|
|
// LED and IO Pins
|
|
|
|
//
|
2012-12-13 19:27:42 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
2012-08-21 23:19:50 -03:00
|
|
|
# define LED_ON HIGH
|
|
|
|
# define LED_OFF LOW
|
2012-10-13 06:40:46 -03:00
|
|
|
# define BATTERY_VOLT_PIN 0 // Battery voltage on A0
|
|
|
|
# define BATTERY_CURR_PIN 1 // Battery current on A1
|
2012-12-13 19:27:42 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
2012-08-21 23:19:50 -03:00
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
2012-10-13 06:40:46 -03:00
|
|
|
# define BATTERY_VOLT_PIN 1 // Battery voltage on A1
|
|
|
|
# define BATTERY_CURR_PIN 2 // Battery current on A2
|
2012-12-18 06:15:11 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
|
|
|
# define BATTERY_VOLT_PIN 1 // Battery voltage on A1
|
|
|
|
# define BATTERY_CURR_PIN 2 // Battery current on A2
|
2013-01-02 07:08:40 -04:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
|
|
|
# define BATTERY_VOLT_PIN -1
|
|
|
|
# define BATTERY_CURR_PIN -1
|
2013-09-23 04:06:51 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
|
|
|
|
# define BATTERY_VOLT_PIN 20
|
|
|
|
# define BATTERY_CURR_PIN 19
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
2013-09-28 08:46:14 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
|
|
|
# define BATTERY_VOLT_PIN -1
|
|
|
|
# define BATTERY_CURR_PIN -1
|
|
|
|
# define LED_ON LOW
|
|
|
|
# define LED_OFF HIGH
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
2012-05-15 11:07:03 -03:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CopterLEDs
|
|
|
|
//
|
|
|
|
|
2012-04-12 10:51:17 -03:00
|
|
|
#ifndef COPTER_LEDS
|
2012-08-21 23:19:50 -03:00
|
|
|
#define COPTER_LEDS ENABLED
|
2012-04-12 10:51:17 -03:00
|
|
|
#endif
|
|
|
|
|
2012-08-21 23:19:50 -03:00
|
|
|
#define COPTER_LED_ON HIGH
|
|
|
|
#define COPTER_LED_OFF LOW
|
2012-05-15 11:07:03 -03:00
|
|
|
|
2012-12-13 19:27:42 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
2012-08-21 23:19:50 -03:00
|
|
|
#define COPTER_LED_1 AN4 // Motor or Aux LED
|
|
|
|
#define COPTER_LED_2 AN5 // Motor LED or Beeper
|
|
|
|
#define COPTER_LED_3 AN6 // Motor or GPS LED
|
|
|
|
#define COPTER_LED_4 AN7 // Motor LED
|
|
|
|
#define COPTER_LED_5 AN8 // Motor LED
|
|
|
|
#define COPTER_LED_6 AN9 // Motor LED
|
|
|
|
#define COPTER_LED_7 AN10 // Motor LED
|
|
|
|
#define COPTER_LED_8 AN11 // Motor LED
|
2013-09-26 09:36:46 -03:00
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL || CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
2012-08-21 23:19:50 -03:00
|
|
|
#define COPTER_LED_1 AN8 // Motor or Aux LED
|
|
|
|
#define COPTER_LED_2 AN9 // Motor LED
|
|
|
|
#define COPTER_LED_3 AN10 // Motor or GPS LED
|
|
|
|
#define COPTER_LED_4 AN11 // Motor LED
|
|
|
|
#define COPTER_LED_5 AN12 // Motor LED
|
|
|
|
#define COPTER_LED_6 AN13 // Motor LED
|
|
|
|
#define COPTER_LED_7 AN14 // Motor LED
|
|
|
|
#define COPTER_LED_8 AN15 // Motor LED
|
2013-09-26 21:32:22 -03:00
|
|
|
#else
|
|
|
|
// not supported yet on this board
|
|
|
|
#undef COPTER_LEDS
|
2012-05-15 11:07:03 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-11-27 02:07:00 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Barometer
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CONFIG_BARO
|
2012-08-21 23:19:50 -03:00
|
|
|
# define CONFIG_BARO AP_BARO_BMP085
|
2011-11-27 02:07:00 -04:00
|
|
|
#endif
|
|
|
|
|
2011-02-20 19:09:28 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Sonar
|
|
|
|
//
|
2011-06-16 14:03:26 -03:00
|
|
|
|
2011-11-12 23:39:41 -04:00
|
|
|
#ifndef CONFIG_SONAR_SOURCE
|
2012-08-21 23:19:50 -03:00
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ADC
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC && CONFIG_ADC == DISABLED
|
2012-08-21 23:19:50 -03:00
|
|
|
# warning Cannot use ADC for CONFIG_SONAR_SOURCE, becaude CONFIG_ADC is DISABLED
|
|
|
|
# warning Defaulting CONFIG_SONAR_SOURCE to ANALOG_PIN
|
|
|
|
# undef CONFIG_SONAR_SOURCE
|
|
|
|
# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC
|
2012-08-21 23:19:50 -03:00
|
|
|
# ifndef CONFIG_SONAR_SOURCE_ADC_CHANNEL
|
|
|
|
# define CONFIG_SONAR_SOURCE_ADC_CHANNEL 7
|
|
|
|
# endif
|
2011-11-12 23:39:41 -04:00
|
|
|
#elif CONFIG_SONAR_SOURCE == SONAR_SOURCE_ANALOG_PIN
|
2012-08-21 23:19:50 -03:00
|
|
|
# ifndef CONFIG_SONAR_SOURCE_ANALOG_PIN
|
2012-12-13 19:27:42 -04:00
|
|
|
# define CONFIG_SONAR_SOURCE_ANALOG_PIN 0
|
2012-08-21 23:19:50 -03:00
|
|
|
# endif
|
2011-11-12 23:39:41 -04:00
|
|
|
#else
|
2012-08-21 23:19:50 -03:00
|
|
|
# warning Invalid value for CONFIG_SONAR_SOURCE, disabling sonar
|
2013-03-18 01:40:43 -03:00
|
|
|
# define CONFIG_SONAR DISABLED
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONFIG_SONAR
|
2012-08-21 23:19:50 -03:00
|
|
|
# define CONFIG_SONAR ENABLED
|
2011-11-12 23:39:41 -04:00
|
|
|
#endif
|
|
|
|
|
2013-01-08 03:41:07 -04:00
|
|
|
#ifndef SONAR_ALT_HEALTH_MAX
|
|
|
|
# define SONAR_ALT_HEALTH_MAX 3 // number of good reads that indicates a healthy sonar
|
|
|
|
#endif
|
|
|
|
|
2013-08-18 21:52:59 -03:00
|
|
|
#ifndef SONAR_RELIABLE_DISTANCE_PCT
|
|
|
|
# define SONAR_RELIABLE_DISTANCE_PCT 0.60f // we trust the sonar out to 60% of it's maximum range
|
|
|
|
#endif
|
|
|
|
|
2013-04-20 03:58:36 -03:00
|
|
|
#ifndef SONAR_GAIN_DEFAULT
|
2013-08-18 21:52:59 -03:00
|
|
|
# define SONAR_GAIN_DEFAULT 2.0 // gain for controlling how quickly sonar range adjusts target altitude (lower means slower reaction)
|
2013-01-08 03:41:07 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef THR_SURFACE_TRACKING_VELZ_MAX
|
2013-08-18 21:52:59 -03:00
|
|
|
# define THR_SURFACE_TRACKING_VELZ_MAX 150 // max vertical speed change while surface tracking with sonar
|
2013-01-08 03:41:07 -04:00
|
|
|
#endif
|
|
|
|
|
2012-02-11 19:53:09 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2013-05-17 02:42:28 -03:00
|
|
|
// Channel 7 and 8 default options
|
2011-08-05 13:21:21 -03:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CH7_OPTION
|
2013-05-17 02:42:28 -03:00
|
|
|
# define CH7_OPTION AUX_SWITCH_SAVE_WP
|
2011-08-05 13:21:21 -03:00
|
|
|
#endif
|
|
|
|
|
2013-05-17 02:42:28 -03:00
|
|
|
#ifndef CH8_OPTION
|
|
|
|
# define CH8_OPTION AUX_SWITCH_DO_NOTHING
|
|
|
|
#endif
|
2011-05-25 02:48:33 -03:00
|
|
|
|
2011-02-24 01:56:59 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HIL_MODE OPTIONAL
|
|
|
|
|
2011-05-09 09:20:22 -03:00
|
|
|
#ifndef HIL_MODE
|
2012-08-21 23:19:50 -03:00
|
|
|
#define HIL_MODE HIL_MODE_DISABLED
|
2011-05-09 09:20:22 -03:00
|
|
|
#endif
|
2011-02-24 01:56:59 -04:00
|
|
|
|
2012-08-21 23:19:50 -03:00
|
|
|
#if HIL_MODE != HIL_MODE_DISABLED // we are in HIL mode
|
2011-05-09 12:46:56 -03:00
|
|
|
|
2011-05-09 09:20:22 -03:00
|
|
|
# undef GPS_PROTOCOL
|
|
|
|
# define GPS_PROTOCOL GPS_PROTOCOL_NONE
|
2011-02-24 01:56:59 -04:00
|
|
|
|
2011-12-11 23:59:39 -04:00
|
|
|
#undef CONFIG_SONAR
|
|
|
|
#define CONFIG_SONAR DISABLED
|
2011-02-24 01:56:59 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GPS_PROTOCOL
|
|
|
|
//
|
|
|
|
#ifndef GPS_PROTOCOL
|
2012-08-21 23:19:50 -03:00
|
|
|
# define GPS_PROTOCOL GPS_PROTOCOL_AUTO
|
2011-02-24 01:56:59 -04:00
|
|
|
#endif
|
2010-12-19 12:40:33 -04:00
|
|
|
|
2011-05-25 02:48:33 -03:00
|
|
|
|
2011-05-09 12:46:56 -03:00
|
|
|
#ifndef MAV_SYSTEM_ID
|
2012-08-21 23:19:50 -03:00
|
|
|
# define MAV_SYSTEM_ID 1
|
2011-05-09 12:46:56 -03:00
|
|
|
#endif
|
|
|
|
|
2011-05-25 02:48:33 -03:00
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Serial port speeds.
|
|
|
|
//
|
|
|
|
#ifndef SERIAL0_BAUD
|
2012-08-21 23:19:50 -03:00
|
|
|
# define SERIAL0_BAUD 115200
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef SERIAL3_BAUD
|
2012-08-21 23:19:50 -03:00
|
|
|
# define SERIAL3_BAUD 57600
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Battery monitoring
|
|
|
|
//
|
2013-10-01 10:34:44 -03:00
|
|
|
#ifndef FS_BATT_VOLTAGE_DEFAULT
|
|
|
|
# define FS_BATT_VOLTAGE_DEFAULT 10.5f // default battery voltage below which failsafe will be triggered
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-02-24 01:56:59 -04:00
|
|
|
|
2013-10-01 10:34:44 -03:00
|
|
|
#ifndef FS_BATT_MAH_DEFAULT
|
|
|
|
# define FS_BATT_MAH_DEFAULT 0 // default battery capacity (in mah) below which failsafe will be triggered
|
2011-09-18 21:12:28 -03:00
|
|
|
#endif
|
|
|
|
|
2013-05-28 09:50:31 -03:00
|
|
|
#ifndef BOARD_VOLTAGE_MIN
|
2013-06-02 08:47:58 -03:00
|
|
|
# define BOARD_VOLTAGE_MIN 4300 // min board voltage in milli volts for pre-arm checks
|
2013-05-28 09:50:31 -03:00
|
|
|
#endif
|
|
|
|
|
2013-05-30 23:31:27 -03:00
|
|
|
#ifndef BOARD_VOLTAGE_MAX
|
|
|
|
# define BOARD_VOLTAGE_MAX 5800 // max board voltage in milli volts for pre-arm checks
|
|
|
|
#endif
|
|
|
|
|
2012-11-13 10:43:54 -04:00
|
|
|
// Battery failsafe
|
2012-12-10 10:47:14 -04:00
|
|
|
#ifndef FS_BATTERY
|
|
|
|
# define FS_BATTERY DISABLED
|
2012-11-13 10:43:54 -04:00
|
|
|
#endif
|
2012-05-15 11:07:03 -03:00
|
|
|
|
2013-03-16 05:27:46 -03:00
|
|
|
// GPS failsafe
|
|
|
|
#ifndef FS_GPS
|
2013-05-26 23:25:37 -03:00
|
|
|
# define FS_GPS ENABLED
|
2013-03-16 05:27:46 -03:00
|
|
|
#endif
|
|
|
|
#ifndef FAILSAFE_GPS_TIMEOUT_MS
|
|
|
|
# define FAILSAFE_GPS_TIMEOUT_MS 5000 // gps failsafe triggers after 5 seconds with no GPS
|
|
|
|
#endif
|
2013-08-15 01:04:43 -03:00
|
|
|
#ifndef GPS_HDOP_GOOD_DEFAULT
|
|
|
|
# define GPS_HDOP_GOOD_DEFAULT 200 // minimum hdop that represents a good position. used during pre-arm checks if fence is enabled
|
|
|
|
#endif
|
2010-12-19 12:40:33 -04:00
|
|
|
|
2013-04-29 09:30:22 -03:00
|
|
|
// GCS failsafe
|
|
|
|
#ifndef FS_GCS
|
|
|
|
# define FS_GCS DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef FS_GCS_TIMEOUT_MS
|
|
|
|
# define FS_GCS_TIMEOUT_MS 5000 // gcs failsafe triggers after 5 seconds with no GCS heartbeat
|
|
|
|
#endif
|
|
|
|
// possible values for FS_GCS parameter
|
|
|
|
#define FS_GCS_DISABLED 0
|
|
|
|
#define FS_GCS_ENABLED_ALWAYS_RTL 1
|
|
|
|
#define FS_GCS_ENABLED_CONTINUE_MISSION 2
|
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MAGNETOMETER
|
2011-02-24 01:56:59 -04:00
|
|
|
#ifndef MAGNETOMETER
|
2012-08-21 23:19:50 -03:00
|
|
|
# define MAGNETOMETER ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
2013-05-31 00:28:04 -03:00
|
|
|
// expected magnetic field strength. pre-arm checks will fail if 50% higher or lower than this value
|
2013-10-09 02:10:16 -03:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
2013-05-31 00:23:19 -03:00
|
|
|
#ifndef COMPASS_MAGFIELD_EXPECTED
|
2013-10-09 02:10:16 -03:00
|
|
|
# define COMPASS_MAGFIELD_EXPECTED 330 // pre arm will fail if mag field > 544 or < 115
|
2013-05-31 00:23:19 -03:00
|
|
|
#endif
|
2013-10-09 02:10:16 -03:00
|
|
|
#else // PX4, SITL
|
2013-05-31 00:23:19 -03:00
|
|
|
#ifndef COMPASS_MAGFIELD_EXPECTED
|
2013-10-09 02:10:16 -03:00
|
|
|
#define COMPASS_MAGFIELD_EXPECTED 530 // pre arm will fail if mag field > 874 or < 185
|
2013-05-31 00:23:19 -03:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2011-07-21 20:14:53 -03:00
|
|
|
// OPTICAL_FLOW
|
2012-11-18 12:16:07 -04:00
|
|
|
#ifndef OPTFLOW // sets global enabled/disabled flag for optflow (as seen in CLI)
|
|
|
|
# define OPTFLOW DISABLED
|
2011-07-21 20:14:53 -03:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_ORIENTATION
|
2012-08-21 23:19:50 -03:00
|
|
|
# define OPTFLOW_ORIENTATION AP_OPTICALFLOW_ADNS3080_PINS_FORWARD
|
2011-07-21 20:14:53 -03:00
|
|
|
#endif
|
2012-01-25 08:55:14 -04:00
|
|
|
#ifndef OPTFLOW_RESOLUTION
|
2012-08-21 23:19:50 -03:00
|
|
|
# define OPTFLOW_RESOLUTION ADNS3080_RESOLUTION_1600
|
2012-01-25 08:55:14 -04:00
|
|
|
#endif
|
2011-07-21 20:14:53 -03:00
|
|
|
#ifndef OPTFLOW_FOV
|
2012-08-21 23:19:50 -03:00
|
|
|
# define OPTFLOW_FOV AP_OPTICALFLOW_ADNS3080_08_FOV
|
2011-07-21 20:14:53 -03:00
|
|
|
#endif
|
2012-01-09 00:53:54 -04:00
|
|
|
// optical flow based loiter PI values
|
|
|
|
#ifndef OPTFLOW_ROLL_P
|
2013-01-10 14:42:24 -04:00
|
|
|
#define OPTFLOW_ROLL_P 2.5f
|
2012-01-09 00:53:54 -04:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_ROLL_I
|
2013-01-10 14:42:24 -04:00
|
|
|
#define OPTFLOW_ROLL_I 0.5f
|
2012-01-25 08:55:14 -04:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_ROLL_D
|
2013-01-10 14:42:24 -04:00
|
|
|
#define OPTFLOW_ROLL_D 0.12f
|
2012-01-09 00:53:54 -04:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_PITCH_P
|
2013-01-10 14:42:24 -04:00
|
|
|
#define OPTFLOW_PITCH_P 2.5f
|
2012-01-09 00:53:54 -04:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_PITCH_I
|
2013-01-10 14:42:24 -04:00
|
|
|
#define OPTFLOW_PITCH_I 0.5f
|
2012-01-25 08:55:14 -04:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_PITCH_D
|
2013-01-10 14:42:24 -04:00
|
|
|
#define OPTFLOW_PITCH_D 0.12f
|
2012-01-09 00:53:54 -04:00
|
|
|
#endif
|
|
|
|
#ifndef OPTFLOW_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
#define OPTFLOW_IMAX 100
|
2012-01-09 00:53:54 -04:00
|
|
|
#endif
|
2013-10-04 03:49:19 -03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Auto Tuning
|
|
|
|
#ifndef AUTOTUNE
|
2013-10-12 23:57:50 -03:00
|
|
|
# define AUTOTUNE ENABLED
|
2013-10-04 03:49:19 -03:00
|
|
|
#endif
|
2012-01-09 00:53:54 -04:00
|
|
|
|
2013-08-04 11:20:21 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Crop Sprayer
|
|
|
|
#ifndef SPRAYER
|
|
|
|
# define SPRAYER DISABLED
|
|
|
|
#endif
|
2011-07-21 20:14:53 -03:00
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// RADIO CONFIGURATION
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FLIGHT_MODE
|
|
|
|
//
|
|
|
|
|
|
|
|
#if !defined(FLIGHT_MODE_1)
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FLIGHT_MODE_1 STABILIZE
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_2)
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FLIGHT_MODE_2 STABILIZE
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_3)
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FLIGHT_MODE_3 STABILIZE
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_4)
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FLIGHT_MODE_4 STABILIZE
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_5)
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FLIGHT_MODE_5 STABILIZE
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_6)
|
2012-08-21 23:19:50 -03:00
|
|
|
# define FLIGHT_MODE_6 STABILIZE
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2012-12-10 10:38:43 -04:00
|
|
|
// Throttle Failsafe
|
2010-12-19 12:40:33 -04:00
|
|
|
//
|
2012-12-10 10:38:43 -04:00
|
|
|
// possible values for FS_THR parameter
|
|
|
|
#define FS_THR_DISABLED 0
|
|
|
|
#define FS_THR_ENABLED_ALWAYS_RTL 1
|
|
|
|
#define FS_THR_ENABLED_CONTINUE_MISSION 2
|
2013-05-01 21:39:44 -03:00
|
|
|
#define FS_THR_ENABLED_ALWAYS_LAND 3
|
2012-11-11 09:11:12 -04:00
|
|
|
|
2012-12-10 10:38:43 -04:00
|
|
|
#ifndef FS_THR_VALUE_DEFAULT
|
|
|
|
# define FS_THR_VALUE_DEFAULT 975
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2012-11-11 09:11:12 -04:00
|
|
|
|
2012-11-24 09:50:09 -04:00
|
|
|
#ifndef LAND_SPEED
|
|
|
|
# define LAND_SPEED 50 // the descent speed for the final stage of landing in cm/s
|
|
|
|
#endif
|
2013-01-08 03:41:07 -04:00
|
|
|
#ifndef LAND_START_ALT
|
|
|
|
# define LAND_START_ALT 1000 // altitude in cm where land controller switches to slow rate of descent
|
|
|
|
#endif
|
|
|
|
#ifndef LAND_DETECTOR_TRIGGER
|
|
|
|
# define LAND_DETECTOR_TRIGGER 50 // number of 50hz iterations with near zero climb rate and low throttle that triggers landing complete.
|
|
|
|
#endif
|
2011-06-19 02:31:33 -03:00
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// STARTUP BEHAVIOUR
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GROUND_START_DELAY
|
|
|
|
//
|
|
|
|
#ifndef GROUND_START_DELAY
|
2012-08-21 23:19:50 -03:00
|
|
|
# define GROUND_START_DELAY 3
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2012-07-10 19:39:13 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CAMERA TRIGGER AND CONTROL
|
|
|
|
//
|
|
|
|
#ifndef CAMERA
|
2013-04-05 10:48:10 -03:00
|
|
|
# define CAMERA ENABLED
|
2012-07-10 19:39:13 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MOUNT (ANTENNA OR CAMERA)
|
|
|
|
//
|
|
|
|
#ifndef MOUNT
|
2013-04-05 10:48:10 -03:00
|
|
|
# define MOUNT ENABLED
|
2012-07-10 19:39:13 -03:00
|
|
|
#endif
|
|
|
|
|
2012-08-08 17:16:48 -03:00
|
|
|
#ifndef MOUNT2
|
2012-08-21 23:19:50 -03:00
|
|
|
# define MOUNT2 DISABLED
|
2012-08-08 17:16:48 -03:00
|
|
|
#endif
|
|
|
|
|
2012-07-10 19:39:13 -03:00
|
|
|
|
2011-09-04 21:15:36 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Attitude Control
|
|
|
|
//
|
|
|
|
|
2012-10-14 05:47:46 -03:00
|
|
|
// definitions for earth frame and body frame
|
|
|
|
// used to specify frame to rate controllers
|
2013-07-06 09:59:57 -03:00
|
|
|
#define EARTH_FRAME 0
|
|
|
|
#define BODY_FRAME 1
|
|
|
|
#define BODY_EARTH_FRAME 2
|
2012-10-14 05:47:46 -03:00
|
|
|
|
2013-01-27 10:48:07 -04:00
|
|
|
|
2013-01-25 02:57:55 -04:00
|
|
|
// Flight mode roll, pitch, yaw, throttle and navigation definitions
|
|
|
|
|
|
|
|
// Acro Mode
|
|
|
|
#ifndef ACRO_YAW
|
|
|
|
# define ACRO_YAW YAW_ACRO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACRO_RP
|
|
|
|
# define ACRO_RP ROLL_PITCH_ACRO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACRO_THR
|
|
|
|
# define ACRO_THR THROTTLE_MANUAL
|
|
|
|
#endif
|
|
|
|
|
2013-08-04 05:46:04 -03:00
|
|
|
#ifndef ACRO_LEVEL_MAX_ANGLE
|
|
|
|
# define ACRO_LEVEL_MAX_ANGLE 3000
|
|
|
|
#endif
|
|
|
|
|
2013-08-04 03:56:35 -03:00
|
|
|
// Sport Mode
|
|
|
|
#ifndef SPORT_YAW
|
2013-08-04 03:56:35 -03:00
|
|
|
# define SPORT_YAW YAW_HOLD
|
2013-08-04 03:56:35 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SPORT_RP
|
|
|
|
# define SPORT_RP ROLL_PITCH_SPORT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SPORT_THR
|
2013-08-10 03:42:02 -03:00
|
|
|
# define SPORT_THR THROTTLE_HOLD
|
2013-08-04 03:56:35 -03:00
|
|
|
#endif
|
|
|
|
|
2011-09-04 21:15:36 -03:00
|
|
|
// Alt Hold Mode
|
|
|
|
#ifndef ALT_HOLD_YAW
|
2012-12-08 01:24:50 -04:00
|
|
|
# define ALT_HOLD_YAW YAW_HOLD
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ALT_HOLD_RP
|
2012-10-27 13:59:57 -03:00
|
|
|
# define ALT_HOLD_RP ROLL_PITCH_STABLE
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ALT_HOLD_THR
|
2012-10-27 13:59:57 -03:00
|
|
|
# define ALT_HOLD_THR THROTTLE_HOLD
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// AUTO Mode
|
2013-04-20 03:36:24 -03:00
|
|
|
// Note: Auto mode yaw behaviour is controlled by WP_YAW_BEHAVIOR parameter
|
|
|
|
#ifndef WP_YAW_BEHAVIOR_DEFAULT
|
2013-05-13 23:52:39 -03:00
|
|
|
# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_LOOK_AT_NEXT_WP_EXCEPT_RTL
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AUTO_RP
|
2012-10-27 13:59:57 -03:00
|
|
|
# define AUTO_RP ROLL_PITCH_AUTO
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AUTO_THR
|
2012-10-27 13:59:57 -03:00
|
|
|
# define AUTO_THR THROTTLE_AUTO
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
2013-01-25 02:57:55 -04:00
|
|
|
// CIRCLE Mode
|
|
|
|
#ifndef CIRCLE_YAW
|
2013-03-22 05:38:07 -03:00
|
|
|
# define CIRCLE_YAW YAW_CIRCLE
|
2013-01-25 02:57:55 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CIRCLE_RP
|
|
|
|
# define CIRCLE_RP ROLL_PITCH_AUTO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CIRCLE_THR
|
|
|
|
# define CIRCLE_THR THROTTLE_HOLD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CIRCLE_NAV
|
|
|
|
# define CIRCLE_NAV NAV_CIRCLE
|
|
|
|
#endif
|
|
|
|
|
2013-08-07 02:03:28 -03:00
|
|
|
#ifndef CIRCLE_RADIUS
|
|
|
|
# define CIRCLE_RADIUS 10 // radius in meters for circle mode
|
|
|
|
#endif
|
|
|
|
|
2013-04-20 00:03:55 -03:00
|
|
|
#ifndef CIRCLE_RATE
|
2013-06-19 00:40:33 -03:00
|
|
|
# define CIRCLE_RATE 20.0f // degrees per second turn rate
|
2013-04-20 00:03:55 -03:00
|
|
|
#endif
|
|
|
|
|
2012-12-12 10:28:26 -04:00
|
|
|
// Guided Mode
|
2013-04-20 03:36:24 -03:00
|
|
|
// Note: Guided mode yaw behaviour is controlled by WP_YAW_BEHAVIOR parameter
|
2012-12-12 10:28:26 -04:00
|
|
|
#ifndef GUIDED_RP
|
|
|
|
# define GUIDED_RP ROLL_PITCH_AUTO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef GUIDED_THR
|
|
|
|
# define GUIDED_THR THROTTLE_AUTO
|
|
|
|
#endif
|
|
|
|
|
2013-01-25 02:57:55 -04:00
|
|
|
#ifndef GUIDED_NAV
|
|
|
|
# define GUIDED_NAV NAV_WP
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// LOITER Mode
|
|
|
|
#ifndef LOITER_YAW
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOITER_YAW YAW_HOLD
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LOITER_RP
|
2013-02-18 01:58:24 -04:00
|
|
|
# define LOITER_RP ROLL_PITCH_LOITER
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LOITER_THR
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOITER_THR THROTTLE_HOLD
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
2013-01-25 02:57:55 -04:00
|
|
|
#ifndef LOITER_NAV
|
2013-02-18 01:58:24 -04:00
|
|
|
# define LOITER_NAV NAV_LOITER
|
2013-01-25 02:57:55 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// POSITION Mode
|
|
|
|
#ifndef POSITION_YAW
|
|
|
|
# define POSITION_YAW YAW_HOLD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef POSITION_RP
|
2013-06-01 17:15:34 -03:00
|
|
|
# define POSITION_RP ROLL_PITCH_LOITER
|
2013-01-25 02:57:55 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef POSITION_THR
|
2013-05-13 23:56:09 -03:00
|
|
|
# define POSITION_THR THROTTLE_MANUAL_TILT_COMPENSATED
|
2013-01-25 02:57:55 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef POSITION_NAV
|
2013-02-18 01:58:24 -04:00
|
|
|
# define POSITION_NAV NAV_LOITER
|
2013-01-25 02:57:55 -04:00
|
|
|
#endif
|
|
|
|
|
2011-09-04 21:15:36 -03:00
|
|
|
|
|
|
|
// RTL Mode
|
2013-04-20 03:36:24 -03:00
|
|
|
// Note: RTL Yaw behaviour is controlled by WP_YAW_BEHAVIOR parameter
|
2011-09-04 21:15:36 -03:00
|
|
|
#ifndef RTL_RP
|
2012-10-27 13:59:57 -03:00
|
|
|
# define RTL_RP ROLL_PITCH_AUTO
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef RTL_THR
|
2012-11-29 08:08:19 -04:00
|
|
|
# define RTL_THR THROTTLE_AUTO
|
2011-09-04 21:15:36 -03:00
|
|
|
#endif
|
|
|
|
|
2011-12-16 00:47:57 -04:00
|
|
|
#ifndef SUPER_SIMPLE
|
2012-10-27 13:59:57 -03:00
|
|
|
# define SUPER_SIMPLE DISABLED
|
2011-12-12 14:20:15 -04:00
|
|
|
#endif
|
|
|
|
|
2012-06-26 14:38:33 -03:00
|
|
|
#ifndef SUPER_SIMPLE_RADIUS
|
2012-10-27 13:59:57 -03:00
|
|
|
# define SUPER_SIMPLE_RADIUS 1000
|
2012-06-26 14:38:33 -03:00
|
|
|
#endif
|
|
|
|
|
2012-02-15 13:09:42 -04:00
|
|
|
// RTL Mode
|
2012-11-29 08:08:19 -04:00
|
|
|
#ifndef RTL_ALT_FINAL
|
2013-08-29 22:34:23 -03:00
|
|
|
# define RTL_ALT_FINAL 0 // the altitude the vehicle will move to as the final stage of Returning to Launch. Set to zero to land.
|
2012-07-19 21:48:48 -03:00
|
|
|
#endif
|
|
|
|
|
2012-11-29 08:08:19 -04:00
|
|
|
#ifndef RTL_ALT
|
|
|
|
# define RTL_ALT 1500 // default alt to return to home in cm, 0 = Maintain current altitude
|
2012-02-15 13:09:42 -04:00
|
|
|
#endif
|
|
|
|
|
2012-11-29 08:08:19 -04:00
|
|
|
#ifndef RTL_ALT_MAX
|
2012-12-21 01:39:48 -04:00
|
|
|
# define RTL_ALT_MAX 8000 // Max height to return to home in cm (i.e 80m)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef RTL_LOITER_TIME
|
|
|
|
# define RTL_LOITER_TIME 5000 // Time (in milliseconds) to loiter above home before begining final descent
|
2012-11-10 01:45:02 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2012-07-03 21:37:37 -03:00
|
|
|
|
2013-01-14 00:07:52 -04:00
|
|
|
// Optical Flow LOITER Mode
|
2012-01-27 20:27:16 -04:00
|
|
|
#ifndef OF_LOITER_YAW
|
2012-10-27 13:59:57 -03:00
|
|
|
# define OF_LOITER_YAW YAW_HOLD
|
2012-01-27 20:27:16 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef OF_LOITER_RP
|
2012-10-27 13:59:57 -03:00
|
|
|
# define OF_LOITER_RP ROLL_PITCH_STABLE_OF
|
2012-01-27 20:27:16 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef OF_LOITER_THR
|
2012-10-27 13:59:57 -03:00
|
|
|
# define OF_LOITER_THR THROTTLE_HOLD
|
2012-01-27 20:27:16 -04:00
|
|
|
#endif
|
2011-09-04 21:15:36 -03:00
|
|
|
|
2013-01-25 02:57:55 -04:00
|
|
|
#ifndef OF_LOITER_NAV
|
|
|
|
# define OF_LOITER_NAV NAV_NONE
|
|
|
|
#endif
|
|
|
|
|
2011-07-10 21:47:08 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2011-07-31 17:09:27 -03:00
|
|
|
// Attitude Control
|
2011-07-10 21:47:08 -03:00
|
|
|
//
|
2011-10-21 00:41:52 -03:00
|
|
|
|
2013-05-17 00:26:42 -03:00
|
|
|
// Acro mode gains
|
2013-08-04 08:22:12 -03:00
|
|
|
#ifndef ACRO_RP_P
|
|
|
|
# define ACRO_RP_P 4.5f
|
2011-12-29 14:23:59 -04:00
|
|
|
#endif
|
|
|
|
|
2013-08-04 08:22:12 -03:00
|
|
|
#ifndef ACRO_YAW_P
|
|
|
|
# define ACRO_YAW_P 4.5f
|
2012-02-18 18:23:21 -04:00
|
|
|
#endif
|
2012-02-15 15:29:25 -04:00
|
|
|
|
2013-05-17 00:05:20 -03:00
|
|
|
// Stabilize (angle controller) gains
|
2011-07-10 21:47:08 -03:00
|
|
|
#ifndef STABILIZE_ROLL_P
|
2013-01-10 14:42:24 -04:00
|
|
|
# define STABILIZE_ROLL_P 4.5f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-10 21:47:08 -03:00
|
|
|
#ifndef STABILIZE_ROLL_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define STABILIZE_ROLL_I 0.0f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-10 21:47:08 -03:00
|
|
|
#ifndef STABILIZE_ROLL_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define STABILIZE_ROLL_IMAX 0
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
2011-07-31 17:09:27 -03:00
|
|
|
#ifndef STABILIZE_PITCH_P
|
2013-01-10 14:42:24 -04:00
|
|
|
# define STABILIZE_PITCH_P 4.5f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-31 17:09:27 -03:00
|
|
|
#ifndef STABILIZE_PITCH_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define STABILIZE_PITCH_I 0.0f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-31 17:09:27 -03:00
|
|
|
#ifndef STABILIZE_PITCH_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define STABILIZE_PITCH_IMAX 0
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
2013-10-12 23:56:01 -03:00
|
|
|
#ifndef STABILIZE_RATE_LIMIT
|
|
|
|
# define STABILIZE_RATE_LIMIT 18000
|
|
|
|
#endif
|
|
|
|
|
2012-01-29 02:00:05 -04:00
|
|
|
#ifndef STABILIZE_YAW_P
|
2013-01-10 14:42:24 -04:00
|
|
|
# define STABILIZE_YAW_P 4.5f // increase for more aggressive Yaw Hold, decrease if it's bouncy
|
2011-10-27 15:55:13 -03:00
|
|
|
#endif
|
2012-01-29 02:00:05 -04:00
|
|
|
#ifndef STABILIZE_YAW_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define STABILIZE_YAW_I 0.0f
|
2011-10-27 15:55:13 -03:00
|
|
|
#endif
|
2012-01-29 02:00:05 -04:00
|
|
|
#ifndef STABILIZE_YAW_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define STABILIZE_YAW_IMAX 0
|
2011-10-27 15:55:13 -03:00
|
|
|
#endif
|
|
|
|
|
2012-12-08 01:23:32 -04:00
|
|
|
#ifndef YAW_LOOK_AHEAD_MIN_SPEED
|
2013-08-01 02:12:55 -03:00
|
|
|
# define YAW_LOOK_AHEAD_MIN_SPEED 100 // minimum ground speed in cm/s required before copter is aimed at ground course
|
2012-11-26 22:36:32 -04:00
|
|
|
#endif
|
|
|
|
|
2011-10-27 15:55:13 -03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Stabilize Rate Control
|
2010-12-19 12:40:33 -04:00
|
|
|
//
|
2013-08-11 00:51:08 -03:00
|
|
|
#ifndef ROLL_PITCH_INPUT_MAX
|
|
|
|
# define ROLL_PITCH_INPUT_MAX 4500 // roll, pitch input range
|
2012-11-10 17:11:11 -04:00
|
|
|
#endif
|
2013-08-11 00:51:08 -03:00
|
|
|
#ifndef DEFAULT_ANGLE_MAX
|
|
|
|
# define DEFAULT_ANGLE_MAX 4500 // ANGLE_MAX parameters default value
|
2012-11-10 17:11:11 -04:00
|
|
|
#endif
|
2011-07-31 17:09:27 -03:00
|
|
|
#ifndef RATE_ROLL_P
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_ROLL_P 0.150f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-31 17:09:27 -03:00
|
|
|
#ifndef RATE_ROLL_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_ROLL_I 0.100f
|
2012-01-29 02:00:05 -04:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_ROLL_D
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_ROLL_D 0.004f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-31 17:09:27 -03:00
|
|
|
#ifndef RATE_ROLL_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define RATE_ROLL_IMAX 500
|
2011-07-10 21:47:08 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef RATE_PITCH_P
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_PITCH_P 0.150f
|
2011-07-10 21:47:08 -03:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_PITCH_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_PITCH_I 0.100f
|
2012-01-29 02:00:05 -04:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_PITCH_D
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_PITCH_D 0.004f
|
2011-07-10 21:47:08 -03:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_PITCH_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define RATE_PITCH_IMAX 500
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
2011-07-10 21:47:08 -03:00
|
|
|
#ifndef RATE_YAW_P
|
2013-03-31 23:49:50 -03:00
|
|
|
# define RATE_YAW_P 0.200f
|
2011-07-10 21:47:08 -03:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_YAW_I
|
2013-07-11 00:18:52 -03:00
|
|
|
# define RATE_YAW_I 0.020f
|
2012-01-29 02:00:05 -04:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_YAW_D
|
2013-01-10 14:42:24 -04:00
|
|
|
# define RATE_YAW_D 0.000f
|
2011-07-10 21:47:08 -03:00
|
|
|
#endif
|
|
|
|
#ifndef RATE_YAW_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define RATE_YAW_IMAX 800
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-06-30 21:19:10 -03:00
|
|
|
|
|
|
|
|
2012-10-14 09:30:16 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Rate controlled stabilized variables
|
|
|
|
//
|
|
|
|
|
2012-10-18 11:24:34 -03:00
|
|
|
#ifndef MAX_ROLL_OVERSHOOT
|
2012-10-27 13:59:57 -03:00
|
|
|
#define MAX_ROLL_OVERSHOOT 3000
|
2012-10-18 11:24:34 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAX_PITCH_OVERSHOOT
|
2012-10-27 13:59:57 -03:00
|
|
|
#define MAX_PITCH_OVERSHOOT 3000
|
2012-10-18 11:24:34 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAX_YAW_OVERSHOOT
|
2012-10-27 13:59:57 -03:00
|
|
|
#define MAX_YAW_OVERSHOOT 1000
|
2012-10-18 11:24:34 -03:00
|
|
|
#endif
|
|
|
|
|
2012-10-23 09:30:50 -03:00
|
|
|
#ifndef ACRO_BALANCE_ROLL
|
2013-08-04 06:14:07 -03:00
|
|
|
#define ACRO_BALANCE_ROLL 1.0f
|
2012-10-18 11:24:34 -03:00
|
|
|
#endif
|
|
|
|
|
2012-10-23 09:30:50 -03:00
|
|
|
#ifndef ACRO_BALANCE_PITCH
|
2013-08-04 06:14:07 -03:00
|
|
|
#define ACRO_BALANCE_PITCH 1.0f
|
2012-12-10 09:27:46 -04:00
|
|
|
#endif
|
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2013-02-18 02:01:22 -04:00
|
|
|
// Loiter position control gains
|
2010-12-19 12:40:33 -04:00
|
|
|
//
|
2011-09-04 21:15:36 -03:00
|
|
|
#ifndef LOITER_P
|
2013-07-11 00:19:45 -03:00
|
|
|
# define LOITER_P 1.0f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-09-04 21:15:36 -03:00
|
|
|
#ifndef LOITER_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define LOITER_I 0.0f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-09-04 21:15:36 -03:00
|
|
|
#ifndef LOITER_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define LOITER_IMAX 0
|
2012-01-22 02:09:13 -04:00
|
|
|
#endif
|
2013-01-14 00:07:52 -04:00
|
|
|
|
2012-02-15 13:09:42 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2013-02-18 02:01:22 -04:00
|
|
|
// Loiter rate control gains
|
2012-02-15 13:09:42 -04:00
|
|
|
//
|
|
|
|
#ifndef LOITER_RATE_P
|
2013-04-09 00:00:41 -03:00
|
|
|
# define LOITER_RATE_P 1.0f
|
2012-02-15 13:09:42 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOITER_RATE_I
|
2013-04-09 00:00:41 -03:00
|
|
|
# define LOITER_RATE_I 0.5f
|
2012-02-15 13:09:42 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOITER_RATE_D
|
2013-04-16 10:28:18 -03:00
|
|
|
# define LOITER_RATE_D 0.0f
|
2012-02-15 13:09:42 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOITER_RATE_IMAX
|
2013-08-19 10:37:57 -03:00
|
|
|
# define LOITER_RATE_IMAX 400 // maximum acceleration from I term build-up in cm/s/s
|
2012-02-15 13:09:42 -04:00
|
|
|
#endif
|
|
|
|
|
2012-01-12 01:49:23 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2013-04-16 10:34:12 -03:00
|
|
|
// Autopilot rotate rate limits
|
2012-01-12 01:49:23 -04:00
|
|
|
//
|
2012-12-08 01:23:32 -04:00
|
|
|
#ifndef AUTO_YAW_SLEW_RATE
|
2013-09-12 10:31:42 -03:00
|
|
|
# define AUTO_YAW_SLEW_RATE 60 // degrees/sec
|
2012-02-15 13:09:42 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Throttle control gains
|
|
|
|
//
|
2011-09-23 03:10:55 -03:00
|
|
|
#ifndef THROTTLE_CRUISE
|
2013-09-12 10:31:42 -03:00
|
|
|
# define THROTTLE_CRUISE 450 // default estimate of throttle required for vehicle to maintain a hover
|
2011-09-23 03:10:55 -03:00
|
|
|
#endif
|
|
|
|
|
2013-10-13 08:41:11 -03:00
|
|
|
#ifndef THR_MID_DEFAULT
|
|
|
|
# define THR_MID_DEFAULT 500 // Throttle output (0 ~ 1000) when throttle stick is in mid position
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef THR_MIN_DEFAULT
|
|
|
|
# define THR_MIN_DEFAULT 130 // minimum throttle sent to the motors when armed and pilot throttle above zero
|
|
|
|
#endif
|
|
|
|
#ifndef THR_MAX_DEFAULT
|
|
|
|
# define THR_MAX_DEFAULT 1000 // maximum throttle sent to the motors
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef THROTTLE_IN_DEADBAND
|
|
|
|
# define THROTTLE_IN_DEADBAND 100 // the throttle input channel's deadband in PWM
|
2013-09-12 10:31:42 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ALT_HOLD_TAKEOFF_JUMP
|
|
|
|
# define ALT_HOLD_TAKEOFF_JUMP 20 // jump in altitude target when taking off in Loiter or AltHold flight modes
|
2013-01-30 11:25:41 -04:00
|
|
|
#endif
|
|
|
|
|
2012-01-29 02:00:05 -04:00
|
|
|
#ifndef ALT_HOLD_P
|
2013-06-16 03:31:36 -03:00
|
|
|
# define ALT_HOLD_P 1.0f
|
2011-10-02 15:36:23 -03:00
|
|
|
#endif
|
2012-01-29 02:00:05 -04:00
|
|
|
#ifndef ALT_HOLD_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define ALT_HOLD_I 0.0f
|
2011-10-02 15:36:23 -03:00
|
|
|
#endif
|
2012-01-29 02:00:05 -04:00
|
|
|
#ifndef ALT_HOLD_IMAX
|
2012-10-27 13:59:57 -03:00
|
|
|
# define ALT_HOLD_IMAX 300
|
2011-10-02 15:36:23 -03:00
|
|
|
#endif
|
|
|
|
|
2011-10-16 19:41:54 -03:00
|
|
|
// RATE control
|
2013-06-30 07:04:21 -03:00
|
|
|
#ifndef THROTTLE_RATE_P
|
|
|
|
# define THROTTLE_RATE_P 6.0f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2013-06-30 07:04:21 -03:00
|
|
|
#ifndef THROTTLE_RATE_I
|
|
|
|
# define THROTTLE_RATE_I 0.0f
|
2012-01-29 02:00:05 -04:00
|
|
|
#endif
|
2013-06-30 07:04:21 -03:00
|
|
|
#ifndef THROTTLE_RATE_D
|
|
|
|
# define THROTTLE_RATE_D 0.0f
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2012-12-17 01:46:30 -04:00
|
|
|
|
2013-06-30 07:04:21 -03:00
|
|
|
#ifndef THROTTLE_RATE_IMAX
|
|
|
|
# define THROTTLE_RATE_IMAX 300
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
|
2012-12-21 23:52:49 -04:00
|
|
|
// default maximum vertical velocity the pilot may request
|
|
|
|
#ifndef PILOT_VELZ_MAX
|
|
|
|
# define PILOT_VELZ_MAX 250 // maximum vertical velocity in cm/s
|
|
|
|
#endif
|
2012-11-25 05:07:33 -04:00
|
|
|
|
2013-03-17 01:24:49 -03:00
|
|
|
// max distance in cm above or below current location that will be used for the alt target when transitioning to alt-hold mode
|
|
|
|
#ifndef ALT_HOLD_INIT_MAX_OVERSHOOT
|
|
|
|
# define ALT_HOLD_INIT_MAX_OVERSHOOT 200
|
|
|
|
#endif
|
|
|
|
// the acceleration used to define the distance-velocity curve
|
|
|
|
#ifndef ALT_HOLD_ACCEL_MAX
|
2013-05-31 09:04:10 -03:00
|
|
|
# define ALT_HOLD_ACCEL_MAX 250 // if you change this you must also update the duplicate declaration in AC_WPNav.h
|
2013-03-17 01:24:49 -03:00
|
|
|
#endif
|
|
|
|
|
2012-11-23 02:57:49 -04:00
|
|
|
// Throttle Accel control
|
|
|
|
#ifndef THROTTLE_ACCEL_P
|
2013-01-10 14:42:24 -04:00
|
|
|
# define THROTTLE_ACCEL_P 0.75f
|
2012-11-23 02:57:49 -04:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_ACCEL_I
|
2013-01-10 14:42:24 -04:00
|
|
|
# define THROTTLE_ACCEL_I 1.50f
|
2012-11-23 02:57:49 -04:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_ACCEL_D
|
2013-01-10 14:42:24 -04:00
|
|
|
# define THROTTLE_ACCEL_D 0.0f
|
2012-11-23 02:57:49 -04:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_ACCEL_IMAX
|
|
|
|
# define THROTTLE_ACCEL_IMAX 500
|
|
|
|
#endif
|
2012-11-21 18:11:38 -04:00
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Dataflash logging control
|
|
|
|
//
|
2013-04-05 10:48:10 -03:00
|
|
|
#ifndef LOGGING_ENABLED
|
2012-08-21 23:19:50 -03:00
|
|
|
# define LOGGING_ENABLED ENABLED
|
2011-07-17 07:31:07 -03:00
|
|
|
#endif
|
|
|
|
|
2011-12-03 19:38:46 -04:00
|
|
|
|
2010-12-19 12:40:33 -04:00
|
|
|
#ifndef LOG_ATTITUDE_FAST
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_ATTITUDE_FAST DISABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_ATTITUDE_MED
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_ATTITUDE_MED ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_GPS
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_GPS ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_PM
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_PM ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_CTUN
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_CTUN ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_NTUN
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_NTUN ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2013-01-12 11:17:44 -04:00
|
|
|
#ifndef LOG_IMU
|
|
|
|
# define LOG_IMU DISABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
|
|
|
#ifndef LOG_CMD
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_CMD ENABLED
|
2010-12-19 12:40:33 -04:00
|
|
|
#endif
|
2011-07-30 17:42:54 -03:00
|
|
|
// current
|
2013-01-26 04:20:41 -04:00
|
|
|
#ifndef LOG_CURRENT
|
2013-04-20 14:32:59 -03:00
|
|
|
# define LOG_CURRENT ENABLED
|
2011-07-30 17:42:54 -03:00
|
|
|
#endif
|
|
|
|
// quad motor PWMs
|
|
|
|
#ifndef LOG_MOTORS
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_MOTORS DISABLED
|
2011-07-30 17:42:54 -03:00
|
|
|
#endif
|
2012-03-25 03:55:49 -03:00
|
|
|
// optical flow
|
2011-07-30 17:42:54 -03:00
|
|
|
#ifndef LOG_OPTFLOW
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_OPTFLOW DISABLED
|
2011-01-16 23:44:12 -04:00
|
|
|
#endif
|
2012-03-25 03:55:49 -03:00
|
|
|
#ifndef LOG_PID
|
2012-10-27 13:59:57 -03:00
|
|
|
# define LOG_PID DISABLED
|
|
|
|
#endif
|
2013-02-09 02:24:02 -04:00
|
|
|
#ifndef LOG_COMPASS
|
|
|
|
# define LOG_COMPASS DISABLED
|
2012-03-25 03:55:49 -03:00
|
|
|
#endif
|
2012-11-07 06:03:30 -04:00
|
|
|
#ifndef LOG_INAV
|
2012-12-06 11:57:08 -04:00
|
|
|
# define LOG_INAV DISABLED
|
|
|
|
#endif
|
|
|
|
#ifndef LOG_CAMERA
|
2013-07-09 23:24:02 -03:00
|
|
|
# define LOG_CAMERA ENABLED
|
2012-11-07 06:03:30 -04:00
|
|
|
#endif
|
2011-07-17 07:31:17 -03:00
|
|
|
|
2011-08-01 07:06:15 -03:00
|
|
|
// calculate the default log_bitmask
|
2012-08-21 23:19:50 -03:00
|
|
|
#define LOGBIT(_s) (LOG_ ## _s ? MASK_LOG_ ## _s : 0)
|
2011-08-01 07:06:15 -03:00
|
|
|
|
|
|
|
#define DEFAULT_LOG_BITMASK \
|
2012-08-21 23:19:50 -03:00
|
|
|
LOGBIT(ATTITUDE_FAST) | \
|
|
|
|
LOGBIT(ATTITUDE_MED) | \
|
2013-01-12 11:17:44 -04:00
|
|
|
LOGBIT(GPS) | \
|
|
|
|
LOGBIT(PM) | \
|
|
|
|
LOGBIT(CTUN) | \
|
|
|
|
LOGBIT(NTUN) | \
|
|
|
|
LOGBIT(IMU) | \
|
|
|
|
LOGBIT(CMD) | \
|
2013-01-26 04:20:41 -04:00
|
|
|
LOGBIT(CURRENT) | \
|
2013-01-12 11:17:44 -04:00
|
|
|
LOGBIT(MOTORS) | \
|
|
|
|
LOGBIT(OPTFLOW) | \
|
|
|
|
LOGBIT(PID) | \
|
2013-02-09 02:24:02 -04:00
|
|
|
LOGBIT(COMPASS) | \
|
2012-11-07 06:03:30 -04:00
|
|
|
LOGBIT(INAV)
|
2011-08-01 07:06:15 -03:00
|
|
|
|
2012-07-16 15:46:43 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AP_Limits Defaults
|
|
|
|
//
|
|
|
|
|
|
|
|
// Enable/disable AP_Limits
|
2013-04-26 06:51:07 -03:00
|
|
|
#ifndef AC_FENCE
|
|
|
|
#define AC_FENCE ENABLED
|
2012-07-16 15:46:43 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-07-17 07:34:05 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Developer Items
|
|
|
|
//
|
|
|
|
|
|
|
|
// use this to completely disable the CLI
|
|
|
|
#ifndef CLI_ENABLED
|
2012-08-21 23:19:50 -03:00
|
|
|
# define CLI_ENABLED ENABLED
|
2011-07-17 07:34:05 -03:00
|
|
|
#endif
|
2011-09-05 02:12:13 -03:00
|
|
|
|
2012-01-01 15:44:51 -04:00
|
|
|
#endif // __ARDUCOPTER_CONFIG_H__
|