2011-09-08 22:29:39 -03:00
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
///
|
2012-04-18 16:16:02 -03:00
|
|
|
#ifdef USE_CMAKE_APM_CONFIG
|
2012-08-21 23:19:51 -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:51 -03:00
|
|
|
#include "APM_Config.h" // <== THIS INCLUDE, DO NOT EDIT IT. EVER.
|
2012-04-18 16:16:02 -03:00
|
|
|
#endif
|
2011-09-08 22:29:39 -03:00
|
|
|
///
|
|
|
|
/// DO NOT EDIT THIS INCLUDE - if you want to make a local change, make that
|
|
|
|
/// change in your local copy of APM_Config.h.
|
|
|
|
///
|
|
|
|
|
|
|
|
// Just so that it's completely clear...
|
2012-08-21 23:19:51 -03:00
|
|
|
#define ENABLED 1
|
|
|
|
#define DISABLED 0
|
2011-09-08 22:29:39 -03:00
|
|
|
|
2012-03-07 03:40:04 -04:00
|
|
|
// this avoids a very common config error
|
|
|
|
#define ENABLE ENABLED
|
|
|
|
#define DISABLE DISABLED
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// HARDWARE CONFIGURATION AND CONNECTIONS
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-12-11 20:33:38 -04:00
|
|
|
#ifdef CONFIG_APM_HARDWARE
|
|
|
|
#error CONFIG_APM_HARDWARE option is depreated! use CONFIG_HAL_BOARD instead.
|
|
|
|
#endif
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
#ifndef MAV_SYSTEM_ID
|
2012-08-21 23:19:51 -03:00
|
|
|
# define MAV_SYSTEM_ID 1
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
2014-07-29 08:38:15 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FrSky telemetry support
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef FRSKY_TELEM_ENABLED
|
2015-05-13 20:00:11 -03:00
|
|
|
#if HAL_CPU_CLASS > HAL_CPU_CLASS_16
|
2014-07-29 08:38:15 -03:00
|
|
|
# define FRSKY_TELEM_ENABLED ENABLED
|
2015-05-13 20:00:11 -03:00
|
|
|
#else
|
|
|
|
# define FRSKY_TELEM_ENABLED DISABLED
|
2014-07-29 08:38:15 -03:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2014-11-02 02:26:05 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Optical flow sensor support
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef OPTFLOW
|
2015-01-03 00:53:35 -04:00
|
|
|
#if AP_AHRS_NAVEKF_AVAILABLE
|
2014-11-02 02:26:05 -04:00
|
|
|
# define OPTFLOW ENABLED
|
2014-11-03 03:33:56 -04:00
|
|
|
#else
|
|
|
|
# define OPTFLOW DISABLED
|
2014-11-02 02:26:05 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2015-05-13 20:00:11 -03:00
|
|
|
#if HAL_CPU_CLASS > HAL_CPU_CLASS_16
|
|
|
|
# define RANGEFINDER_ENABLED ENABLED
|
|
|
|
#else
|
|
|
|
# define RANGEFINDER_ENABLED DISABLED
|
|
|
|
#endif
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// RADIO CONFIGURATION
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Radio channel limits
|
|
|
|
//
|
2011-09-09 11:18:38 -03:00
|
|
|
// Note that these are not called out in APM_Config.h.reference.
|
2011-09-08 22:29:39 -03:00
|
|
|
//
|
|
|
|
#ifndef CH5_MIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH5_MIN 1000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH5_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH5_MAX 2000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH6_MIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH6_MIN 1000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH6_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH6_MAX 2000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH7_MIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH7_MIN 1000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH7_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH7_MAX 2000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH8_MIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH8_MIN 1000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef CH8_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CH8_MAX 2000
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-09-09 11:18:38 -03:00
|
|
|
#ifndef FLAP_1_PERCENT
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLAP_1_PERCENT 0
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
#ifndef FLAP_1_SPEED
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLAP_1_SPEED 0
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
#ifndef FLAP_2_PERCENT
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLAP_2_PERCENT 0
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
#ifndef FLAP_2_SPEED
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLAP_2_SPEED 0
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FLIGHT_MODE
|
|
|
|
// FLIGHT_MODE_CHANNEL
|
|
|
|
//
|
|
|
|
#ifndef FLIGHT_MODE_CHANNEL
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLIGHT_MODE_CHANNEL 8
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#if (FLIGHT_MODE_CHANNEL != 5) && (FLIGHT_MODE_CHANNEL != 6) && (FLIGHT_MODE_CHANNEL != 7) && (FLIGHT_MODE_CHANNEL != 8)
|
2012-08-21 23:19:51 -03:00
|
|
|
# error XXX
|
|
|
|
# error XXX You must set FLIGHT_MODE_CHANNEL to 5, 6, 7 or 8
|
|
|
|
# error XXX
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(FLIGHT_MODE_1)
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLIGHT_MODE_1 RTL
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_2)
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLIGHT_MODE_2 RTL
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_3)
|
2013-08-11 09:40:36 -03:00
|
|
|
# define FLIGHT_MODE_3 FLY_BY_WIRE_A
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_4)
|
2013-08-11 09:40:36 -03:00
|
|
|
# define FLIGHT_MODE_4 FLY_BY_WIRE_A
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_5)
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLIGHT_MODE_5 MANUAL
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#if !defined(FLIGHT_MODE_6)
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FLIGHT_MODE_6 MANUAL
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// THROTTLE_FAILSAFE
|
|
|
|
// THROTTLE_FS_VALUE
|
|
|
|
// SHORT_FAILSAFE_ACTION
|
|
|
|
// LONG_FAILSAFE_ACTION
|
|
|
|
#ifndef THROTTLE_FAILSAFE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define THROTTLE_FAILSAFE ENABLED
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
2011-09-09 11:18:38 -03:00
|
|
|
#ifndef THROTTLE_FS_VALUE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define THROTTLE_FS_VALUE 950
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef SHORT_FAILSAFE_ACTION
|
2012-08-21 23:19:51 -03:00
|
|
|
# define SHORT_FAILSAFE_ACTION 0
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef LONG_FAILSAFE_ACTION
|
2012-08-21 23:19:51 -03:00
|
|
|
# define LONG_FAILSAFE_ACTION 0
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AUTO_TRIM
|
|
|
|
//
|
|
|
|
#ifndef AUTO_TRIM
|
2012-08-21 23:19:51 -03:00
|
|
|
# define AUTO_TRIM DISABLED
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// THROTTLE_OUT
|
|
|
|
//
|
|
|
|
#ifndef THROTTE_OUT
|
2012-08-21 23:19:51 -03:00
|
|
|
# define THROTTLE_OUT ENABLED
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// STARTUP BEHAVIOUR
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-06-10 17:08:48 -03:00
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// GROUND_START_DELAY
|
|
|
|
//
|
|
|
|
#ifndef GROUND_START_DELAY
|
2012-08-21 23:19:51 -03:00
|
|
|
# define GROUND_START_DELAY 0
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
2011-09-09 11:18:38 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// ENABLE ELEVON_MIXING
|
|
|
|
//
|
|
|
|
#ifndef ELEVON_MIXING
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ELEVON_MIXING DISABLED
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
#ifndef ELEVON_REVERSE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ELEVON_REVERSE DISABLED
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
#ifndef ELEVON_CH1_REVERSE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ELEVON_CH1_REVERSE DISABLED
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
#ifndef ELEVON_CH2_REVERSE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ELEVON_CH2_REVERSE DISABLED
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
|
2012-06-13 16:00:20 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CAMERA TRIGGER AND CONTROL
|
|
|
|
//
|
2012-08-26 20:32:27 -03:00
|
|
|
// uses 1182 bytes of memory
|
2012-06-13 16:00:20 -03:00
|
|
|
#ifndef CAMERA
|
2012-08-21 23:19:51 -03:00
|
|
|
# define CAMERA ENABLED
|
2012-06-13 16:00:20 -03:00
|
|
|
#endif
|
|
|
|
|
2011-10-31 18:55:58 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MOUNT (ANTENNA OR CAMERA)
|
|
|
|
//
|
2012-08-26 20:33:45 -03:00
|
|
|
// uses 7726 bytes of memory on 2560 chips (all options are enabled)
|
2011-10-31 18:55:58 -03:00
|
|
|
#ifndef MOUNT
|
2015-04-29 22:57:20 -03:00
|
|
|
#if HAL_CPU_CLASS > HAL_CPU_CLASS_16
|
2012-08-21 23:19:51 -03:00
|
|
|
# define MOUNT ENABLED
|
2015-04-29 22:57:20 -03:00
|
|
|
#else
|
|
|
|
# define MOUNT DISABLED
|
|
|
|
#endif
|
2011-10-31 18:55:58 -03:00
|
|
|
#endif
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FLIGHT AND NAVIGATION CONTROL
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Altitude measurement and control.
|
|
|
|
//
|
|
|
|
#ifndef ALTITUDE_MIX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ALTITUDE_MIX 1
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AIRSPEED_CRUISE
|
|
|
|
//
|
|
|
|
#ifndef AIRSPEED_CRUISE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define AIRSPEED_CRUISE 12 // 12 m/s
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#define AIRSPEED_CRUISE_CM AIRSPEED_CRUISE*100
|
|
|
|
|
2011-12-09 19:40:56 -04:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MIN_GNDSPEED
|
|
|
|
//
|
|
|
|
#ifndef MIN_GNDSPEED
|
2012-08-21 23:19:51 -03:00
|
|
|
# define MIN_GNDSPEED 0 // m/s (0 disables)
|
2011-12-09 19:40:56 -04:00
|
|
|
#endif
|
|
|
|
#define MIN_GNDSPEED_CM MIN_GNDSPEED*100
|
|
|
|
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// FLY_BY_WIRE_B airspeed control
|
|
|
|
//
|
|
|
|
#ifndef AIRSPEED_FBW_MIN
|
2013-08-16 18:01:25 -03:00
|
|
|
# define AIRSPEED_FBW_MIN 9
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef AIRSPEED_FBW_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define AIRSPEED_FBW_MAX 22
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
2011-10-17 02:11:40 -03:00
|
|
|
|
|
|
|
#ifndef ALT_HOLD_FBW
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ALT_HOLD_FBW 0
|
2011-10-17 02:11:40 -03:00
|
|
|
#endif
|
|
|
|
#define ALT_HOLD_FBW_CM ALT_HOLD_FBW*100
|
|
|
|
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Servo Mapping
|
|
|
|
//
|
|
|
|
#ifndef THROTTLE_MIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define THROTTLE_MIN 0 // percent
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_CRUISE
|
2012-08-21 23:19:51 -03:00
|
|
|
# define THROTTLE_CRUISE 45
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef THROTTLE_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define THROTTLE_MAX 75
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Autopilot control limits
|
|
|
|
//
|
|
|
|
#ifndef HEAD_MAX
|
2012-08-21 23:19:51 -03:00
|
|
|
# define HEAD_MAX 45
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef PITCH_MAX
|
2014-03-03 00:49:04 -04:00
|
|
|
# define PITCH_MAX 20
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#ifndef PITCH_MIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define PITCH_MIN -25
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#define HEAD_MAX_CENTIDEGREE HEAD_MAX * 100
|
|
|
|
#define PITCH_MAX_CENTIDEGREE PITCH_MAX * 100
|
|
|
|
#define PITCH_MIN_CENTIDEGREE PITCH_MIN * 100
|
|
|
|
|
|
|
|
#ifndef RUDDER_MIX
|
2015-04-11 06:43:13 -03:00
|
|
|
# define RUDDER_MIX 0.5f
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// DEBUGGING
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Dataflash logging control
|
|
|
|
//
|
2011-09-09 11:18:38 -03:00
|
|
|
|
|
|
|
#ifndef LOGGING_ENABLED
|
2012-08-21 23:19:51 -03:00
|
|
|
# define LOGGING_ENABLED ENABLED
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
|
2013-12-30 07:26:02 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
2013-01-26 04:19:42 -04:00
|
|
|
#define DEFAULT_LOG_BITMASK \
|
2013-04-19 10:54:40 -03:00
|
|
|
MASK_LOG_ATTITUDE_MED | \
|
|
|
|
MASK_LOG_GPS | \
|
|
|
|
MASK_LOG_PM | \
|
|
|
|
MASK_LOG_NTUN | \
|
2013-07-14 08:10:00 -03:00
|
|
|
MASK_LOG_CTUN | \
|
2013-04-19 10:54:40 -03:00
|
|
|
MASK_LOG_MODE | \
|
|
|
|
MASK_LOG_CMD | \
|
2013-04-20 14:29:08 -03:00
|
|
|
MASK_LOG_COMPASS | \
|
2013-06-26 05:36:53 -03:00
|
|
|
MASK_LOG_CURRENT | \
|
2013-07-09 23:23:36 -03:00
|
|
|
MASK_LOG_TECS | \
|
2013-11-25 17:44:17 -04:00
|
|
|
MASK_LOG_CAMERA | \
|
|
|
|
MASK_LOG_RC
|
2013-12-30 07:26:02 -04:00
|
|
|
#else
|
|
|
|
// other systems have plenty of space for full logs
|
|
|
|
#define DEFAULT_LOG_BITMASK 0xffff
|
|
|
|
#endif
|
2013-04-20 14:29:08 -03:00
|
|
|
|
2011-09-09 11:18:38 -03:00
|
|
|
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Navigation defaults
|
|
|
|
//
|
|
|
|
#ifndef WP_RADIUS_DEFAULT
|
2014-08-29 18:43:11 -03:00
|
|
|
# define WP_RADIUS_DEFAULT 90
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LOITER_RADIUS_DEFAULT
|
2012-08-21 23:19:51 -03:00
|
|
|
# define LOITER_RADIUS_DEFAULT 60
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ALT_HOLD_HOME
|
2012-08-21 23:19:51 -03:00
|
|
|
# define ALT_HOLD_HOME 100
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
#define ALT_HOLD_HOME_CM ALT_HOLD_HOME*100
|
|
|
|
|
|
|
|
#ifndef USE_CURRENT_ALT
|
2012-08-21 23:19:51 -03:00
|
|
|
# define USE_CURRENT_ALT FALSE
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
2011-09-09 11:18:38 -03:00
|
|
|
#ifndef INVERTED_FLIGHT_PWM
|
2012-08-21 23:19:51 -03:00
|
|
|
# define INVERTED_FLIGHT_PWM 1750
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
|
|
|
|
2014-11-06 02:27:26 -04:00
|
|
|
#ifndef PX4IO_OVERRIDE_PWM
|
|
|
|
# define PX4IO_OVERRIDE_PWM 1750
|
|
|
|
#endif
|
|
|
|
|
2011-09-08 22:29:39 -03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Developer Items
|
|
|
|
//
|
|
|
|
|
2012-07-25 22:30:23 -03:00
|
|
|
#ifndef SCALING_SPEED
|
2012-08-21 23:19:51 -03:00
|
|
|
# define SCALING_SPEED 15.0
|
2011-09-08 22:29:39 -03:00
|
|
|
#endif
|
|
|
|
|
2014-10-22 02:14:29 -03:00
|
|
|
// use this to completely disable the CLI. We now default the CLI to
|
2014-12-03 05:14:26 -04:00
|
|
|
// off on smaller boards.
|
2011-09-09 11:18:38 -03:00
|
|
|
#ifndef CLI_ENABLED
|
2014-12-03 05:14:26 -04:00
|
|
|
#if HAL_CPU_CLASS > HAL_CPU_CLASS_16
|
|
|
|
# define CLI_ENABLED ENABLED
|
|
|
|
#else
|
2014-10-22 02:14:29 -03:00
|
|
|
# define CLI_ENABLED DISABLE
|
2011-09-09 11:18:38 -03:00
|
|
|
#endif
|
2014-12-03 05:14:26 -04:00
|
|
|
#endif
|
2011-09-09 11:18:38 -03:00
|
|
|
|
2012-08-26 20:32:27 -03:00
|
|
|
// use this to disable geo-fencing
|
2011-12-15 03:08:58 -04:00
|
|
|
#ifndef GEOFENCE_ENABLED
|
2015-06-20 01:52:42 -03:00
|
|
|
#if HAL_CPU_CLASS > HAL_CPU_CLASS_16
|
2012-08-21 23:19:51 -03:00
|
|
|
# define GEOFENCE_ENABLED ENABLED
|
2015-06-20 01:52:42 -03:00
|
|
|
#else
|
|
|
|
# define GEOFENCE_ENABLED DISABLE
|
|
|
|
#endif
|
2011-12-15 03:08:58 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// pwm value on FENCE_CHANNEL to use to enable fenced mode
|
|
|
|
#ifndef FENCE_ENABLE_PWM
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FENCE_ENABLE_PWM 1750
|
2011-12-15 03:08:58 -04:00
|
|
|
#endif
|
2011-12-16 15:28:25 -04:00
|
|
|
|
|
|
|
// a digital pin to set high when the geo-fence triggers. Defaults
|
|
|
|
// to -1, which means don't activate a pin
|
|
|
|
#ifndef FENCE_TRIGGERED_PIN
|
2012-08-21 23:19:51 -03:00
|
|
|
# define FENCE_TRIGGERED_PIN -1
|
2011-12-16 15:28:25 -04:00
|
|
|
#endif
|
2011-12-18 18:42:32 -04:00
|
|
|
|
|
|
|
// if RESET_SWITCH_CH is not zero, then this is the PWM value on
|
|
|
|
// that channel where we reset the control mode to the current switch
|
|
|
|
// position (to for example return to switched mode after failsafe or
|
|
|
|
// fence breach)
|
|
|
|
#ifndef RESET_SWITCH_CHAN_PWM
|
2012-08-21 23:19:51 -03:00
|
|
|
# define RESET_SWITCH_CHAN_PWM 1750
|
2011-12-18 18:42:32 -04:00
|
|
|
#endif
|
2012-03-03 03:33:40 -04:00
|
|
|
|
2012-07-08 22:49:26 -03:00
|
|
|
// OBC Failsafe enable
|
|
|
|
#ifndef OBC_FAILSAFE
|
2014-08-08 00:30:51 -03:00
|
|
|
#if HAL_CPU_CLASS >= HAL_CPU_CLASS_75
|
|
|
|
# define OBC_FAILSAFE ENABLED
|
|
|
|
#else
|
2012-08-21 23:19:51 -03:00
|
|
|
# define OBC_FAILSAFE DISABLED
|
2012-07-08 22:49:26 -03:00
|
|
|
#endif
|
2014-08-08 00:30:51 -03:00
|
|
|
#endif
|
2012-08-21 23:12:15 -03:00
|
|
|
|
2014-09-23 22:02:11 -03:00
|
|
|
#if OBC_FAILSAFE == ENABLED && HAL_CPU_CLASS < HAL_CPU_CLASS_75
|
|
|
|
#define CLI_ENABLED DISABLED
|
|
|
|
#endif
|
|
|
|
|
2013-11-08 07:27:22 -04:00
|
|
|
/*
|
|
|
|
build a firmware version string.
|
|
|
|
GIT_VERSION comes from Makefile builds
|
|
|
|
*/
|
|
|
|
#ifndef GIT_VERSION
|
|
|
|
#define FIRMWARE_STRING THISFIRMWARE
|
|
|
|
#else
|
|
|
|
#define FIRMWARE_STRING THISFIRMWARE " (" GIT_VERSION ")"
|
|
|
|
#endif
|