2010-12-19 12:40:33 -04:00
//
2016-02-17 21:26:00 -04:00
# pragma once
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
///
2016-01-04 14:39:21 -04:00
# include "APM_Config.h"
2012-04-18 16:16:02 -03:00
2010-12-19 12:40:33 -04:00
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// HARDWARE CONFIGURATION AND CONNECTIONS
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
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
2016-01-21 22:59:47 -04:00
# ifndef ARMING_DELAY_SEC
# define ARMING_DELAY_SEC 2.0f
# 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
2017-01-09 05:54:18 -04:00
# define FRAME_CONFIG MULTICOPTER_FRAME
2010-12-19 12:40:33 -04:00
# endif
2012-08-16 19:40:28 -03:00
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
2013-12-15 10:15:44 -04:00
# define RC_FAST_SPEED 125
# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_LOOK_AHEAD
2014-02-02 03:58:36 -04:00
# define AUTOTUNE_ENABLED DISABLED
2012-12-08 21:41:05 -04:00
# endif
2012-12-08 15:49:38 -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
2011-02-20 19:09:28 -04:00
//////////////////////////////////////////////////////////////////////////////
2016-04-27 08:37:04 -03:00
// Rangefinder
2011-02-20 19:09:28 -04:00
//
2011-06-16 14:03:26 -03:00
2016-04-27 07:55:35 -03:00
# ifndef RANGEFINDER_ENABLED
# define RANGEFINDER_ENABLED ENABLED
2011-11-12 23:39:41 -04:00
# endif
2016-04-27 08:37:04 -03:00
# ifndef RANGEFINDER_HEALTH_MAX
# define RANGEFINDER_HEALTH_MAX 3 // number of good reads that indicates a healthy rangefinder
2013-01-08 03:41:07 -04:00
# endif
2019-04-11 00:20:43 -03:00
# ifndef RANGEFINDER_TIMEOUT_MS
# define RANGEFINDER_TIMEOUT_MS 1000 // rangefinder filter reset if no updates from sensor in 1 second
# endif
2021-06-14 00:38:37 -03:00
# ifndef RANGEFINDER_FILT_DEFAULT
2021-06-24 22:09:55 -03:00
# define RANGEFINDER_FILT_DEFAULT 0.5f // filter for rangefinder distance
2021-06-14 00:38:37 -03:00
# endif
2019-04-11 00:20:43 -03:00
# ifndef SURFACE_TRACKING_VELZ_MAX
# define SURFACE_TRACKING_VELZ_MAX 150 // max vertical speed change while surface tracking with rangefinder
2013-01-08 03:41:07 -04:00
# endif
2019-04-11 00:20:43 -03:00
# ifndef SURFACE_TRACKING_TIMEOUT_MS
# define SURFACE_TRACKING_TIMEOUT_MS 1000 // surface tracking target alt will reset to current rangefinder alt after this many milliseconds without a good rangefinder alt
2014-08-14 07:37:00 -03:00
# endif
2016-04-27 08:37:04 -03:00
# ifndef RANGEFINDER_TILT_CORRECTION // by disable tilt correction for use of range finder data by EKF
2016-04-28 00:32:46 -03:00
# define RANGEFINDER_TILT_CORRECTION ENABLED
2014-09-10 07:13:58 -03:00
# endif
2016-11-20 02:26:51 -04:00
# ifndef RANGEFINDER_GLITCH_ALT_CM
# define RANGEFINDER_GLITCH_ALT_CM 200 // amount of rangefinder change to be considered a glitch
# endif
# ifndef RANGEFINDER_GLITCH_NUM_SAMPLES
# define RANGEFINDER_GLITCH_NUM_SAMPLES 3 // number of rangefinder glitches in a row to take new reading
# endif
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
//////////////////////////////////////////////////////////////////////////////
// Battery monitoring
//
2013-05-28 09:50:31 -03:00
# ifndef BOARD_VOLTAGE_MIN
2014-02-13 02:12:10 -04:00
# define BOARD_VOLTAGE_MIN 4.3f // min board voltage in 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
2014-02-13 02:12:10 -04:00
# define BOARD_VOLTAGE_MAX 5.8f // max board voltage in volts for pre-arm checks
2013-05-30 23:31:27 -03:00
# endif
2015-03-12 23:05:30 -03:00
// prearm GPS hdop check
2013-08-15 01:04:43 -03:00
# ifndef GPS_HDOP_GOOD_DEFAULT
2015-07-14 02:10:23 -03:00
# define GPS_HDOP_GOOD_DEFAULT 140 // minimum hdop that represents a good position. used during pre-arm checks if fence is enabled
2013-08-15 01:04:43 -03:00
# 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
2015-12-22 15:27:24 -04:00
2014-07-16 23:41:43 -03:00
// Radio failsafe while using RC_override
# ifndef FS_RADIO_RC_OVERRIDE_TIMEOUT_MS
2015-05-22 01:40:58 -03:00
# define FS_RADIO_RC_OVERRIDE_TIMEOUT_MS 1000 // RC Radio failsafe triggers after 1 second while using RC_override from ground station
2014-07-16 23:41:43 -03:00
# endif
2014-07-16 15:02:32 -03:00
// Radio failsafe
2014-07-16 23:41:43 -03:00
# ifndef FS_RADIO_TIMEOUT_MS
2019-03-25 20:57:55 -03:00
# define FS_RADIO_TIMEOUT_MS 500 // RC Radio Failsafe triggers after 500 milliseconds with No RC Input
2014-07-16 15:02:32 -03:00
# endif
2016-04-22 08:37:48 -03:00
// missing terrain data failsafe
# ifndef FS_TERRAIN_TIMEOUT_MS
# define FS_TERRAIN_TIMEOUT_MS 5000 // 5 seconds of missing terrain data will trigger failsafe (RTL)
# endif
2015-12-22 19:12:15 -04:00
# ifndef PREARM_DISPLAY_PERIOD
# define PREARM_DISPLAY_PERIOD 30
# endif
2014-09-18 05:24:40 -03:00
// pre-arm baro vs inertial nav max alt disparity
2014-09-18 05:32:03 -03:00
# ifndef PREARM_MAX_ALT_DISPARITY_CM
2014-10-12 20:44:46 -03:00
# define PREARM_MAX_ALT_DISPARITY_CM 100 // barometer and inertial nav altitude must be within this many centimeters
2014-09-18 05:24:40 -03:00
# endif
2014-07-21 07:07:15 -03:00
//////////////////////////////////////////////////////////////////////////////
2015-06-09 22:16:52 -03:00
// EKF Failsafe
2015-06-09 23:39:06 -03:00
# ifndef FS_EKF_ACTION_DEFAULT
# define FS_EKF_ACTION_DEFAULT FS_EKF_ACTION_LAND // EKF failsafe triggers land by default
# endif
2015-06-09 22:16:52 -03:00
# ifndef FS_EKF_THRESHOLD_DEFAULT
# define FS_EKF_THRESHOLD_DEFAULT 0.8f // EKF failsafe's default compass and velocity variance threshold above which the EKF failsafe will be triggered
2014-07-21 07:07:15 -03:00
# endif
2021-06-27 22:05:19 -03:00
# ifndef EKF_ORIGIN_MAX_ALT_KM
# define EKF_ORIGIN_MAX_ALT_KM 50 // EKF origin and home must be within 50km vertically
2015-02-09 07:23:49 -04:00
# endif
2010-12-19 12:40:33 -04:00
//////////////////////////////////////////////////////////////////////////////
2020-04-06 01:13:09 -03:00
// OPTICAL_FLOW
2014-10-15 03:17:36 -03:00
# ifndef OPTFLOW
2015-06-10 00:14:13 -03:00
# define OPTFLOW ENABLED
2011-07-21 20:14:53 -03:00
# endif
2013-10-04 03:49:19 -03:00
//////////////////////////////////////////////////////////////////////////////
// Auto Tuning
2014-02-02 03:58:36 -04:00
# ifndef AUTOTUNE_ENABLED
# define AUTOTUNE_ENABLED 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
//////////////////////////////////////////////////////////////////////////////
2018-02-12 00:45:45 -04:00
// Crop Sprayer - enabled only on larger firmwares
2018-04-13 23:16:11 -03:00
# ifndef SPRAYER_ENABLED
2020-01-17 18:57:48 -04:00
# define SPRAYER_ENABLED HAL_SPRAYER_ENABLED
2013-08-04 11:20:21 -03:00
# endif
2011-07-21 20:14:53 -03:00
2015-02-16 00:39:18 -04:00
//////////////////////////////////////////////////////////////////////////////
// Precision Landing with companion computer or IRLock sensor
# ifndef PRECISION_LANDING
2016-02-29 06:17:20 -04:00
# define PRECISION_LANDING ENABLED
2015-02-16 00:39:18 -04:00
# endif
2016-10-28 19:08:22 -03:00
//////////////////////////////////////////////////////////////////////////////
2018-02-12 00:45:45 -04:00
// gripper - enabled only on larger firmwares
2016-10-28 19:08:22 -03:00
# ifndef GRIPPER_ENABLED
2018-02-12 00:45:45 -04:00
# define GRIPPER_ENABLED !HAL_MINIMIZE_FEATURES
2016-10-28 19:08:22 -03:00
# endif
2018-02-10 10:23:06 -04:00
//////////////////////////////////////////////////////////////////////////////
2018-10-30 00:12:02 -03:00
// winch support
2018-02-10 10:23:06 -04:00
# ifndef WINCH_ENABLED
2020-07-26 23:09:22 -03:00
# define WINCH_ENABLED !HAL_MINIMIZE_FEATURES
2018-02-10 10:23:06 -04:00
# endif
2014-04-02 12:19:54 -03:00
//////////////////////////////////////////////////////////////////////////////
2018-03-29 10:49:27 -03:00
// rotations per minute sensor support
# ifndef RPM_ENABLED
2018-07-28 03:00:47 -03:00
# define RPM_ENABLED !HAL_MINIMIZE_FEATURES
2018-03-29 10:49:27 -03:00
# endif
//////////////////////////////////////////////////////////////////////////////
2014-04-02 12:19:54 -03:00
// Parachute release
# ifndef PARACHUTE
2020-01-17 18:57:48 -04:00
# define PARACHUTE HAL_PARACHUTE_ENABLED
2014-04-02 12:19:54 -03:00
# endif
2014-05-23 02:29:08 -03:00
//////////////////////////////////////////////////////////////////////////////
// Nav-Guided - allows external nav computer to control vehicle
# ifndef NAV_GUIDED
2018-03-14 08:41:47 -03:00
# define NAV_GUIDED !HAL_MINIMIZE_FEATURES
2014-05-23 02:29:08 -03:00
# endif
2018-03-14 17:14:49 -03:00
//////////////////////////////////////////////////////////////////////////////
// Acro - fly vehicle in acrobatic mode
# ifndef MODE_ACRO_ENABLED
# define MODE_ACRO_ENABLED ENABLED
# endif
2018-02-21 22:06:07 -04:00
//////////////////////////////////////////////////////////////////////////////
// Auto mode - allows vehicle to trace waypoints and perform automated actions
# ifndef MODE_AUTO_ENABLED
# define MODE_AUTO_ENABLED ENABLED
# endif
2018-02-23 01:40:29 -04:00
//////////////////////////////////////////////////////////////////////////////
// Brake mode - bring vehicle to stop
# ifndef MODE_BRAKE_ENABLED
# define MODE_BRAKE_ENABLED ENABLED
# endif
2018-02-23 05:51:17 -04:00
//////////////////////////////////////////////////////////////////////////////
// Circle - fly vehicle around a central point
# ifndef MODE_CIRCLE_ENABLED
# define MODE_CIRCLE_ENABLED ENABLED
# endif
2018-02-22 23:55:51 -04:00
//////////////////////////////////////////////////////////////////////////////
// Drift - fly vehicle in altitude-held, coordinated-turn mode
# ifndef MODE_DRIFT_ENABLED
# define MODE_DRIFT_ENABLED ENABLED
# endif
2018-11-25 19:47:55 -04:00
//////////////////////////////////////////////////////////////////////////////
// flip - fly vehicle in flip in pitch and roll direction mode
# ifndef MODE_FLIP_ENABLED
# define MODE_FLIP_ENABLED ENABLED
# endif
2018-02-06 02:16:09 -04:00
//////////////////////////////////////////////////////////////////////////////
// Follow - follow another vehicle or GCS
# ifndef MODE_FOLLOW_ENABLED
# define MODE_FOLLOW_ENABLED !HAL_MINIMIZE_FEATURES
# endif
2018-02-23 00:09:07 -04:00
//////////////////////////////////////////////////////////////////////////////
// Guided mode - control vehicle's position or angles from GCS
# ifndef MODE_GUIDED_ENABLED
# define MODE_GUIDED_ENABLED ENABLED
# endif
2018-02-23 03:54:34 -04:00
//////////////////////////////////////////////////////////////////////////////
// GuidedNoGPS mode - control vehicle's angles from GCS
# ifndef MODE_GUIDED_NOGPS_ENABLED
2018-07-28 03:01:10 -03:00
# define MODE_GUIDED_NOGPS_ENABLED !HAL_MINIMIZE_FEATURES
2018-02-23 03:54:34 -04:00
# endif
2018-02-22 01:23:35 -04:00
//////////////////////////////////////////////////////////////////////////////
// Loiter mode - allows vehicle to hold global position
# ifndef MODE_LOITER_ENABLED
# define MODE_LOITER_ENABLED ENABLED
# endif
2018-02-21 23:45:02 -04:00
//////////////////////////////////////////////////////////////////////////////
// Position Hold - enable holding of global position
# ifndef MODE_POSHOLD_ENABLED
# define MODE_POSHOLD_ENABLED ENABLED
# endif
2018-02-23 01:33:49 -04:00
//////////////////////////////////////////////////////////////////////////////
// RTL - Return To Launch
# ifndef MODE_RTL_ENABLED
# define MODE_RTL_ENABLED ENABLED
# endif
2018-02-21 23:58:28 -04:00
//////////////////////////////////////////////////////////////////////////////
// SmartRTL - allows vehicle to retrace a (loop-eliminated) breadcrumb home
# ifndef MODE_SMARTRTL_ENABLED
# define MODE_SMARTRTL_ENABLED ENABLED
# endif
2018-02-22 23:48:02 -04:00
//////////////////////////////////////////////////////////////////////////////
// Sport - fly vehicle in rate-controlled (earth-frame) mode
# ifndef MODE_SPORT_ENABLED
2018-04-08 21:10:01 -03:00
# define MODE_SPORT_ENABLED !HAL_MINIMIZE_FEATURES
2018-02-22 23:48:02 -04:00
# endif
2019-07-29 04:55:40 -03:00
//////////////////////////////////////////////////////////////////////////////
// System ID - conduct system identification tests on vehicle
# ifndef MODE_SYSTEMID_ENABLED
# define MODE_SYSTEMID_ENABLED !HAL_MINIMIZE_FEATURES
# endif
2018-03-14 17:16:16 -03:00
//////////////////////////////////////////////////////////////////////////////
// Throw - fly vehicle after throwing it in the air
# ifndef MODE_THROW_ENABLED
# define MODE_THROW_ENABLED ENABLED
# endif
2018-09-07 01:23:33 -03:00
//////////////////////////////////////////////////////////////////////////////
// ZigZag - allow vehicle to fly in a zigzag manner with predefined point A B
# ifndef MODE_ZIGZAG_ENABLED
# define MODE_ZIGZAG_ENABLED !HAL_MINIMIZE_FEATURES
2020-04-02 05:25:39 -03:00
# endif
2018-03-14 17:16:16 -03:00
2021-07-27 16:51:19 -03:00
//////////////////////////////////////////////////////////////////////////////
// Turtle - allow vehicle to be flipped over after a crash
# ifndef MODE_TURTLE_ENABLED
# define MODE_TURTLE_ENABLED !HAL_MINIMIZE_FEATURES && !defined(DISABLE_DSHOT) && FRAME_CONFIG != HELI_FRAME
# endif
2018-02-22 00:53:20 -04:00
//////////////////////////////////////////////////////////////////////////////
2019-11-28 16:21:07 -04:00
//////////////////////////////////////////////////////////////////////////////
// Autorotate - autonomous auto-rotation - helicopters only
# if CONFIG_HAL_BOARD == HAL_BOARD_SITL
# if FRAME_CONFIG == HELI_FRAME
# ifndef MODE_AUTOROTATE_ENABLED
# define MODE_AUTOROTATE_ENABLED !HAL_MINIMIZE_FEATURES
# endif
# else
# define MODE_AUTOROTATE_ENABLED DISABLED
# endif
# else
# define MODE_AUTOROTATE_ENABLED DISABLED
# endif
//////////////////////////////////////////////////////////////////////////////
2018-02-22 00:53:20 -04:00
// Beacon support - support for local positioning systems
# ifndef BEACON_ENABLED
2018-03-14 08:41:47 -03:00
# define BEACON_ENABLED !HAL_MINIMIZE_FEATURES
2018-02-22 00:53:20 -04:00
# endif
2021-02-06 23:29:33 -04:00
//////////////////////////////////////////////////////////////////////////////
// Landing Gear support
# ifndef LANDING_GEAR_ENABLED
2021-02-15 20:14:19 -04:00
# define LANDING_GEAR_ENABLED ENABLED
2021-02-06 23:29:33 -04:00
# endif
2010-12-19 12:40:33 -04:00
//////////////////////////////////////////////////////////////////////////////
// RADIO CONFIGURATION
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// FLIGHT_MODE
//
2014-09-11 04:52:36 -03:00
# ifndef FLIGHT_MODE_1
2019-09-07 20:33:56 -03:00
# define FLIGHT_MODE_1 Mode::Number::STABILIZE
2010-12-19 12:40:33 -04:00
# endif
2014-09-11 04:52:36 -03:00
# ifndef FLIGHT_MODE_2
2019-09-07 20:33:56 -03:00
# define FLIGHT_MODE_2 Mode::Number::STABILIZE
2010-12-19 12:40:33 -04:00
# endif
2014-09-11 04:52:36 -03:00
# ifndef FLIGHT_MODE_3
2019-09-07 20:33:56 -03:00
# define FLIGHT_MODE_3 Mode::Number::STABILIZE
2010-12-19 12:40:33 -04:00
# endif
2014-09-11 04:52:36 -03:00
# ifndef FLIGHT_MODE_4
2019-09-07 20:33:56 -03:00
# define FLIGHT_MODE_4 Mode::Number::STABILIZE
2010-12-19 12:40:33 -04:00
# endif
2014-09-11 04:52:36 -03:00
# ifndef FLIGHT_MODE_5
2019-09-07 20:33:56 -03:00
# define FLIGHT_MODE_5 Mode::Number::STABILIZE
2010-12-19 12:40:33 -04:00
# endif
2014-09-11 04:52:36 -03:00
# ifndef FLIGHT_MODE_6
2019-09-07 20:33:56 -03:00
# define FLIGHT_MODE_6 Mode::Number::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
# 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
2015-04-30 02:24:48 -03:00
//////////////////////////////////////////////////////////////////////////////
// Takeoff
//
# ifndef PILOT_TKOFF_ALT_DEFAULT
# define PILOT_TKOFF_ALT_DEFAULT 0 // default final alt above home for pilot initiated takeoff
# endif
//////////////////////////////////////////////////////////////////////////////
// Landing
//
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
2014-07-06 06:05:43 -03:00
# ifndef LAND_REPOSITION_DEFAULT
2014-08-30 22:44:09 -03:00
# define LAND_REPOSITION_DEFAULT 1 // by default the pilot can override roll/pitch during landing
2014-07-06 06:05:43 -03:00
# endif
2014-07-06 06:16:27 -03:00
# ifndef LAND_WITH_DELAY_MS
# define LAND_WITH_DELAY_MS 4000 // default delay (in milliseconds) when a land-with-delay is triggered during a failsafe event
# endif
2016-01-14 01:47:26 -04:00
# ifndef LAND_CANCEL_TRIGGER_THR
# define LAND_CANCEL_TRIGGER_THR 700 // land is cancelled by input throttle above 700
# endif
2016-08-16 00:06:49 -03:00
# ifndef LAND_RANGEFINDER_MIN_ALT_CM
# define LAND_RANGEFINDER_MIN_ALT_CM 200
# endif
2011-06-19 02:31:33 -03:00
2015-06-17 08:34:35 -03:00
//////////////////////////////////////////////////////////////////////////////
// Landing Detector
//
# ifndef LAND_DETECTOR_TRIGGER_SEC
# define LAND_DETECTOR_TRIGGER_SEC 1.0f // number of seconds to detect a landing
# endif
# ifndef LAND_DETECTOR_MAYBE_TRIGGER_SEC
# define LAND_DETECTOR_MAYBE_TRIGGER_SEC 0.2f // number of seconds that means we might be landed (used to reset horizontal position targets to prevent tipping over)
# endif
# ifndef LAND_DETECTOR_ACCEL_LPF_CUTOFF
# define LAND_DETECTOR_ACCEL_LPF_CUTOFF 1.0f // frequency cutoff of land detector accelerometer filter
# endif
2015-06-17 08:37:15 -03:00
# ifndef LAND_DETECTOR_ACCEL_MAX
# define LAND_DETECTOR_ACCEL_MAX 1.0f // vehicle acceleration must be under 1m/s/s
# endif
2015-06-17 08:34:35 -03:00
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
2011-09-04 21:15:36 -03:00
//////////////////////////////////////////////////////////////////////////////
2014-02-03 08:07:30 -04:00
// Flight mode definitions
2011-09-04 21:15:36 -03:00
//
2013-01-25 02:57:55 -04:00
// Acro Mode
2021-09-17 02:54:19 -03:00
# ifndef ACRO_LEVEL_MAX_ANGLE
# define ACRO_LEVEL_MAX_ANGLE 3000 // maximum lean angle in trainer mode measured in centidegrees
2013-01-25 02:57:55 -04:00
# endif
2021-09-17 02:54:19 -03:00
# ifndef ACRO_LEVEL_MAX_OVERSHOOT
# define ACRO_LEVEL_MAX_OVERSHOOT 1000 // maximum overshoot angle in trainer mode when full roll or pitch stick is held in centidegrees
2013-08-04 05:46:04 -03:00
# endif
2014-02-03 08:07:30 -04:00
# ifndef ACRO_BALANCE_ROLL
# define ACRO_BALANCE_ROLL 1.0f
2012-12-12 10:28:26 -04:00
# endif
2014-02-03 08:07:30 -04:00
# ifndef ACRO_BALANCE_PITCH
# define ACRO_BALANCE_PITCH 1.0f
2012-12-12 10:28:26 -04:00
# endif
2016-06-22 01:16:28 -03:00
# ifndef ACRO_RP_EXPO_DEFAULT
2021-09-17 02:54:19 -03:00
# define ACRO_RP_EXPO_DEFAULT 0.3f // ACRO roll and pitch expo parameter default
2016-06-22 01:16:28 -03:00
# endif
# ifndef ACRO_Y_EXPO_DEFAULT
2021-09-17 02:54:19 -03:00
# define ACRO_Y_EXPO_DEFAULT 0.0f // ACRO yaw expo parameter default
2016-06-22 01:16:28 -03:00
# endif
# ifndef ACRO_THR_MID_DEFAULT
# define ACRO_THR_MID_DEFAULT 0.0f
2014-08-12 23:25:59 -03:00
# endif
2021-09-16 01:34:34 -03:00
# ifndef ACRO_RP_RATE_DEFAULT
2021-09-17 02:54:19 -03:00
# define ACRO_RP_RATE_DEFAULT 360 // ACRO roll and pitch rotation rate parameter default in deg/s
2021-09-16 01:34:34 -03:00
# endif
# ifndef ACRO_Y_RATE_DEFAULT
2021-09-17 02:54:19 -03:00
# define ACRO_Y_RATE_DEFAULT 202.5 // ACRO yaw rotation rate parameter default in deg/s
2021-09-16 01:34:34 -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
2021-09-17 02:54:19 -03:00
# define RTL_ALT_FINAL 0 // the altitude, in cm, 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
2020-04-23 01:14:18 -03:00
# 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
2013-08-13 05:53:45 -03:00
# ifndef RTL_ALT_MIN
# define RTL_ALT_MIN 200 // min height above ground for RTL (i.e 2m)
# endif
2015-07-12 22:39:54 -03:00
2016-01-07 04:29:54 -04:00
# ifndef RTL_CLIMB_MIN_DEFAULT
# define RTL_CLIMB_MIN_DEFAULT 0 // vehicle will always climb this many cm as first stage of RTL
# endif
2016-01-06 03:00:29 -04:00
# ifndef RTL_ABS_MIN_CLIMB
2016-01-07 04:29:54 -04:00
# define RTL_ABS_MIN_CLIMB 250 // absolute minimum initial climb
2016-01-06 03:00:29 -04:00
# endif
2016-05-31 00:18:43 -03:00
# ifndef RTL_CONE_SLOPE_DEFAULT
# define RTL_CONE_SLOPE_DEFAULT 3.0f // slope of RTL cone (height / distance). 0 = No cone
2016-01-06 03:00:29 -04:00
# endif
2016-01-07 04:29:54 -04:00
# ifndef RTL_MIN_CONE_SLOPE
# define RTL_MIN_CONE_SLOPE 0.5f // minimum slope of cone
2015-07-12 22:39:54 -03:00
# endif
2013-08-13 05:53:45 -03:00
2012-12-21 01:39:48 -04:00
# ifndef RTL_LOITER_TIME
2016-05-12 14:24:23 -03:00
# define RTL_LOITER_TIME 5000 // Time (in milliseconds) to loiter above home before beginning final descent
2012-11-10 01:45:02 -04:00
# endif
2014-02-03 08:07:30 -04:00
// AUTO Mode
# ifndef WP_YAW_BEHAVIOR_DEFAULT
# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_LOOK_AT_NEXT_WP_EXCEPT_RTL
2010-12-19 12:40:33 -04: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
2014-02-03 08:07:30 -04:00
// Super Simple mode
# ifndef SUPER_SIMPLE_RADIUS
# define SUPER_SIMPLE_RADIUS 1000
# endif
2011-10-27 15:55:13 -03:00
//////////////////////////////////////////////////////////////////////////////
// Stabilize Rate Control
2010-12-19 12:40:33 -04:00
//
2016-10-23 03:59:09 -03:00
# ifndef ROLL_PITCH_YAW_INPUT_MAX
# define ROLL_PITCH_YAW_INPUT_MAX 4500 // roll, pitch and yaw input range
2012-11-10 17:11:11 -04:00
# endif
2013-08-11 00:51:08 -03:00
# ifndef DEFAULT_ANGLE_MAX
2021-02-19 21:21:01 -04:00
# define DEFAULT_ANGLE_MAX 3000 // ANGLE_MAX parameters default value
2012-11-10 17:11:11 -04:00
# endif
2014-02-03 08:07:30 -04:00
2015-04-22 18:10:30 -03:00
//////////////////////////////////////////////////////////////////////////////
// Stop mode defaults
//
2015-06-05 03:29:00 -03:00
# ifndef BRAKE_MODE_SPEED_Z
# define BRAKE_MODE_SPEED_Z 250 // z-axis speed in cm/s in Brake Mode
# endif
2015-05-17 00:22:20 -03:00
# ifndef BRAKE_MODE_DECEL_RATE
# define BRAKE_MODE_DECEL_RATE 750 // acceleration rate in cm/s/s in Brake Mode
2015-04-22 18:10:30 -03:00
# endif
2014-04-11 05:15:09 -03:00
//////////////////////////////////////////////////////////////////////////////
2014-07-11 02:08:09 -03:00
// PosHold parameter defaults
2014-04-11 05:15:09 -03:00
//
2014-07-11 02:08:09 -03:00
# ifndef POSHOLD_BRAKE_RATE_DEFAULT
# define POSHOLD_BRAKE_RATE_DEFAULT 8 // default POSHOLD_BRAKE_RATE param value. Rotation rate during braking in deg/sec
2014-04-11 05:15:09 -03:00
# endif
2014-07-11 02:08:09 -03:00
# ifndef POSHOLD_BRAKE_ANGLE_DEFAULT
# define POSHOLD_BRAKE_ANGLE_DEFAULT 3000 // default POSHOLD_BRAKE_ANGLE param value. Max lean angle during braking in centi-degrees
2014-04-11 05:15:09 -03:00
# endif
2010-12-19 12:40:33 -04:00
//////////////////////////////////////////////////////////////////////////////
2021-09-16 01:34:34 -03:00
// Pilot control defaults
2010-12-19 12:40:33 -04:00
//
2013-10-13 08:41:11 -03:00
2013-10-27 10:13:42 -03:00
# ifndef THR_DZ_DEFAULT
# define THR_DZ_DEFAULT 100 // the deadzone above and below mid throttle while in althold or loiter
2013-09-12 10:31:42 -03:00
# endif
2014-04-30 00:05:02 -03:00
// default maximum vertical velocity and acceleration the pilot may request
2012-12-21 23:52:49 -04:00
# ifndef PILOT_VELZ_MAX
# define PILOT_VELZ_MAX 250 // maximum vertical velocity in cm/s
# endif
2014-04-30 00:05:02 -03:00
# ifndef PILOT_ACCEL_Z_DEFAULT
# define PILOT_ACCEL_Z_DEFAULT 250 // vertical acceleration in cm/s/s while altitude is under pilot control
# endif
2012-11-25 05:07:33 -04:00
2021-09-16 01:34:34 -03:00
# ifndef PILOT_Y_RATE_DEFAULT
2021-09-17 02:54:19 -03:00
# define PILOT_Y_RATE_DEFAULT 202.5 // yaw rotation rate parameter default in deg/s for all mode except ACRO
2021-09-16 01:34:34 -03:00
# endif
# ifndef PILOT_Y_EXPO_DEFAULT
2021-09-17 02:54:19 -03:00
# define PILOT_Y_EXPO_DEFAULT 0.0 // yaw expo parameter default for all mode except ACRO
2021-09-16 01:34:34 -03:00
# endif
2015-08-30 22:44:08 -03:00
# ifndef AUTO_DISARMING_DELAY
# define AUTO_DISARMING_DELAY 10
# endif
2016-08-02 02:30:32 -03:00
//////////////////////////////////////////////////////////////////////////////
// Throw mode configuration
//
# ifndef THROW_HIGH_SPEED
# define THROW_HIGH_SPEED 500.0f // vehicle much reach this total 3D speed in cm/s (or be free falling)
# endif
# ifndef THROW_VERTICAL_SPEED
# define THROW_VERTICAL_SPEED 50.0f // motors start when vehicle reaches this total 3D speed in cm/s
# endif
2010-12-19 12:40:33 -04:00
//////////////////////////////////////////////////////////////////////////////
2019-02-11 04:11:20 -04:00
// Logging control
2010-12-19 12:40:33 -04:00
//
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
2015-03-13 03:25:08 -03:00
// Default logging bitmask
# ifndef DEFAULT_LOG_BITMASK
2013-12-05 03:04:52 -04:00
# define DEFAULT_LOG_BITMASK \
MASK_LOG_ATTITUDE_MED | \
MASK_LOG_GPS | \
MASK_LOG_PM | \
MASK_LOG_CTUN | \
MASK_LOG_NTUN | \
MASK_LOG_RCIN | \
MASK_LOG_IMU | \
MASK_LOG_CMD | \
MASK_LOG_CURRENT | \
MASK_LOG_RCOUT | \
2014-12-07 22:16:53 -04:00
MASK_LOG_OPTFLOW | \
2013-12-05 03:04:52 -04:00
MASK_LOG_COMPASS | \
2015-03-04 02:21:01 -04:00
MASK_LOG_CAMERA | \
2015-03-18 09:08:30 -03:00
MASK_LOG_MOTBATT
2012-11-07 06:03:30 -04:00
# endif
2011-07-17 07:31:17 -03:00
2012-07-16 15:46:43 -03:00
//////////////////////////////////////////////////////////////////////////////
2017-01-02 20:36:26 -04:00
// Fence, Rally and Terrain and AC_Avoidance defaults
2012-07-16 15:46:43 -03:00
//
2016-02-03 20:55:07 -04:00
// Enable/disable Fence
2013-04-26 06:51:07 -03:00
# ifndef AC_FENCE
# define AC_FENCE ENABLED
2012-07-16 15:46:43 -03:00
# endif
2014-04-06 22:18:43 -03:00
# ifndef AC_RALLY
2014-05-27 02:43:33 -03:00
# define AC_RALLY ENABLED
2014-04-06 22:18:43 -03:00
# endif
2012-07-16 15:46:43 -03:00
2021-02-12 23:40:10 -04:00
# if AP_TERRAIN_AVAILABLE && !AC_RALLY
2017-01-02 19:50:17 -04:00
# error Terrain relies on Rally which is disabled
2015-11-13 23:38:47 -04:00
# endif
2017-01-02 20:36:26 -04:00
# ifndef AC_AVOID_ENABLED
# define AC_AVOID_ENABLED ENABLED
# endif
2019-06-05 07:47:32 -03:00
# ifndef AC_OAPATHPLANNER_ENABLED
# define AC_OAPATHPLANNER_ENABLED !HAL_MINIMIZE_FEATURES
# endif
2017-01-02 20:36:26 -04:00
# if AC_AVOID_ENABLED && !AC_FENCE
# error AC_Avoidance relies on AC_FENCE which is disabled
# endif
2018-05-07 18:53:32 -03:00
# if MODE_FOLLOW_ENABLED && !AC_AVOID_ENABLED
# error Follow Mode relies on AC_AVOID which is disabled
# endif
2018-02-23 00:09:07 -04:00
# if MODE_AUTO_ENABLED && !MODE_GUIDED_ENABLED
# error ModeAuto requires ModeGuided which is disabled
# endif
2018-02-23 05:51:17 -04:00
# if MODE_AUTO_ENABLED && !MODE_CIRCLE_ENABLED
# error ModeAuto requires ModeCircle which is disabled
# endif
2018-02-23 21:15:19 -04:00
# if MODE_AUTO_ENABLED && !MODE_RTL_ENABLED
# error ModeAuto requires ModeRTL which is disabled
# endif
2021-02-12 23:40:10 -04:00
# if AP_TERRAIN_AVAILABLE && !MODE_AUTO_ENABLED
2018-02-23 21:15:19 -04:00
# error Terrain requires ModeAuto which is disabled
# endif
2018-03-14 17:14:49 -03:00
# if FRAME_CONFIG == HELI_FRAME && !MODE_ACRO_ENABLED
# error Helicopter frame requires acro mode support which is disabled
# endif
2019-02-25 10:32:52 -04:00
# if MODE_SMARTRTL_ENABLED && !MODE_RTL_ENABLED
# error SmartRTL requires ModeRTL which is disabled
# endif
2020-09-19 05:37:52 -03:00
# if HAL_ADSB_ENABLED && !MODE_GUIDED_ENABLED
2019-02-25 10:32:52 -04:00
# error ADSB requires ModeGuided which is disabled
# endif
# if MODE_FOLLOW_ENABLED && !MODE_GUIDED_ENABLED
# error Follow requires ModeGuided which is disabled
# endif
2019-08-21 00:41:46 -03:00
# if MODE_GUIDED_NOGPS_ENABLED && !MODE_GUIDED_ENABLED
# error ModeGuided-NoGPS requires ModeGuided which is disabled
# endif
2011-07-17 07:34:05 -03:00
//////////////////////////////////////////////////////////////////////////////
// Developer Items
//
2014-07-28 19:25:40 -03:00
//use this to completely disable FRSKY TELEM
# ifndef FRSKY_TELEM_ENABLED
# define FRSKY_TELEM_ENABLED ENABLED
# endif
2016-08-16 07:23:27 -03:00
# ifndef ADVANCED_FAILSAFE
2016-08-25 10:22:10 -03:00
# define ADVANCED_FAILSAFE DISABLED
2016-08-16 07:23:27 -03:00
# endif
2017-04-10 05:39:10 -03:00
# ifndef CH_MODE_DEFAULT
2018-01-27 03:20:32 -04:00
# define CH_MODE_DEFAULT 5
2017-04-10 05:39:10 -03:00
# endif
2017-04-10 05:39:10 -03:00
# ifndef TOY_MODE_ENABLED
# define TOY_MODE_ENABLED DISABLED
# endif
2018-02-26 01:52:24 -04:00
# if TOY_MODE_ENABLED && FRAME_CONFIG == HELI_FRAME
# error Toy mode is not available on Helicopters
# endif
2018-02-28 08:20:57 -04:00
# ifndef STATS_ENABLED
# define STATS_ENABLED ENABLED
# endif
2018-03-04 05:41:06 -04:00
2018-06-23 04:11:05 -03:00
# ifndef OSD_ENABLED
# define OSD_ENABLED DISABLED
# endif
2019-02-04 19:53:34 -04:00
# ifndef HAL_FRAME_TYPE_DEFAULT
# define HAL_FRAME_TYPE_DEFAULT AP_Motors::MOTOR_FRAME_TYPE_X
# endif