5 //////////////////////////////////////////////////////////////////////////////
6 //////////////////////////////////////////////////////////////////////////////
7 // HARDWARE CONFIGURATION AND CONNECTIONS
8 //////////////////////////////////////////////////////////////////////////////
9 //////////////////////////////////////////////////////////////////////////////
11 #ifdef CONFIG_APM_HARDWARE
12 #error CONFIG_APM_HARDWARE option is depreated! use CONFIG_HAL_BOARD instead.
16 # define MAV_SYSTEM_ID 1
19 //////////////////////////////////////////////////////////////////////////////
20 //////////////////////////////////////////////////////////////////////////////
21 // RADIO CONFIGURATION
22 //////////////////////////////////////////////////////////////////////////////
23 //////////////////////////////////////////////////////////////////////////////
26 #ifndef FLAP_1_PERCENT
27 # define FLAP_1_PERCENT 0
30 # define FLAP_1_SPEED 0
32 #ifndef FLAP_2_PERCENT
33 # define FLAP_2_PERCENT 0
36 # define FLAP_2_SPEED 0
38 //////////////////////////////////////////////////////////////////////////////
40 // FLIGHT_MODE_CHANNEL
42 #ifndef FLIGHT_MODE_CHANNEL
43 # define FLIGHT_MODE_CHANNEL 8
45 #if (FLIGHT_MODE_CHANNEL != 5) && (FLIGHT_MODE_CHANNEL != 6) && (FLIGHT_MODE_CHANNEL != 7) && (FLIGHT_MODE_CHANNEL != 8)
47 # error XXX You must set FLIGHT_MODE_CHANNEL to 5, 6, 7 or 8
51 #if !defined(FLIGHT_MODE_1)
52 # define FLIGHT_MODE_1 Mode::Number::RTL
54 #if !defined(FLIGHT_MODE_2)
55 # define FLIGHT_MODE_2 Mode::Number::RTL
57 #if !defined(FLIGHT_MODE_3)
58 # define FLIGHT_MODE_3 Mode::Number::FLY_BY_WIRE_A
60 #if !defined(FLIGHT_MODE_4)
61 # define FLIGHT_MODE_4 Mode::Number::FLY_BY_WIRE_A
63 #if !defined(FLIGHT_MODE_5)
64 # define FLIGHT_MODE_5 Mode::Number::MANUAL
66 #if !defined(FLIGHT_MODE_6)
67 # define FLIGHT_MODE_6 Mode::Number::MANUAL
71 //////////////////////////////////////////////////////////////////////////////
75 # define AUTO_TRIM DISABLED
79 //////////////////////////////////////////////////////////////////////////////
80 //////////////////////////////////////////////////////////////////////////////
82 //////////////////////////////////////////////////////////////////////////////
83 //////////////////////////////////////////////////////////////////////////////
86 //////////////////////////////////////////////////////////////////////////////
89 #ifndef GROUND_START_DELAY
90 # define GROUND_START_DELAY 0
93 #ifndef DSPOILR_RUD_RATE_DEFAULT
94 #define DSPOILR_RUD_RATE_DEFAULT 100
97 //////////////////////////////////////////////////////////////////////////////
98 //////////////////////////////////////////////////////////////////////////////
99 // FLIGHT AND NAVIGATION CONTROL
100 //////////////////////////////////////////////////////////////////////////////
101 //////////////////////////////////////////////////////////////////////////////
103 //////////////////////////////////////////////////////////////////////////////
106 #ifndef AIRSPEED_CRUISE
107 # define AIRSPEED_CRUISE 12 // 12 m/s
112 //////////////////////////////////////////////////////////////////////////////
115 #ifndef MIN_GROUNDSPEED
116 # define MIN_GROUNDSPEED 0 // m/s (0 disables)
120 //////////////////////////////////////////////////////////////////////////////
121 // FLY_BY_WIRE_B airspeed control
123 #ifndef AIRSPEED_FBW_MIN
124 # define AIRSPEED_FBW_MIN 9
126 #ifndef AIRSPEED_FBW_MAX
127 # define AIRSPEED_FBW_MAX 22
130 #ifndef CRUISE_ALT_FLOOR
131 # define CRUISE_ALT_FLOOR 0
135 //////////////////////////////////////////////////////////////////////////////
139 # define THROTTLE_MIN 0 // percent
141 #ifndef THROTTLE_CRUISE
142 # define THROTTLE_CRUISE 45
145 # define THROTTLE_MAX 100
148 //////////////////////////////////////////////////////////////////////////////
149 // Autopilot control limits
151 #ifndef ROLL_LIMIT_DEG
152 # define ROLL_LIMIT_DEG 45
155 # define PITCH_MAX 20
158 # define PITCH_MIN -25
162 # define RUDDER_MIX 0.5f
166 //////////////////////////////////////////////////////////////////////////////
167 //////////////////////////////////////////////////////////////////////////////
169 //////////////////////////////////////////////////////////////////////////////
170 //////////////////////////////////////////////////////////////////////////////
172 //////////////////////////////////////////////////////////////////////////////
176 #define DEFAULT_LOG_BITMASK 0xffff
179 //////////////////////////////////////////////////////////////////////////////
180 // Navigation defaults
182 #ifndef WP_RADIUS_DEFAULT
183 # define WP_RADIUS_DEFAULT 90
186 #ifndef LOITER_RADIUS_DEFAULT
187 # define LOITER_RADIUS_DEFAULT 60
190 #ifndef ALT_HOLD_HOME
191 # define ALT_HOLD_HOME 100
194 //////////////////////////////////////////////////////////////////////////////
198 #ifndef SCALING_SPEED
199 # define SCALING_SPEED 15.0
202 // a digital pin to set high when the geo-fence triggers. Defaults
203 // to -1, which means don't activate a pin
204 #ifndef FENCE_TRIGGERED_PIN
205 # define FENCE_TRIGGERED_PIN -1
208 #ifndef AP_PLANE_OFFBOARD_GUIDED_SLEW_ENABLED
209 #define AP_PLANE_OFFBOARD_GUIDED_SLEW_ENABLED 1
212 //////////////////////////////////////////////////////////////////////////////
214 #ifndef FS_EKF_THRESHOLD_DEFAULT
215 # define FS_EKF_THRESHOLD_DEFAULT 0.8f // EKF failsafe's default compass and velocity variance threshold above which the EKF failsafe will be triggered
218 /////////////////////////////////////////////////////////////////////////////
219 // Landing Throttle Control Trigger Threshold
220 #ifndef THR_CTRL_LAND_THRESH
221 #define THR_CTRL_LAND_THRESH 0.7