Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduCopter/config.h
9692 views
1
//
2
#pragma once
3
4
//////////////////////////////////////////////////////////////////////////////
5
//////////////////////////////////////////////////////////////////////////////
6
//
7
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
8
//
9
// DO NOT EDIT this file to adjust your configuration. Create your own
10
// APM_Config.h and use APM_Config.h.example as a reference.
11
//
12
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
13
///
14
//////////////////////////////////////////////////////////////////////////////
15
//////////////////////////////////////////////////////////////////////////////
16
//
17
// Default and automatic configuration details.
18
//
19
// Notes for maintainers:
20
//
21
// - Try to keep this file organised in the same order as APM_Config.h.example
22
//
23
#include "defines.h"
24
25
///
26
/// DO NOT EDIT THIS INCLUDE - if you want to make a local change, make that
27
/// change in your local copy of APM_Config.h.
28
///
29
#include "APM_Config.h"
30
#include <AP_ADSB/AP_ADSB_config.h>
31
#include <AP_Follow/AP_Follow_config.h>
32
#include <AC_Avoidance/AC_Avoidance_config.h>
33
34
//////////////////////////////////////////////////////////////////////////////
35
//////////////////////////////////////////////////////////////////////////////
36
// HARDWARE CONFIGURATION AND CONNECTIONS
37
//////////////////////////////////////////////////////////////////////////////
38
//////////////////////////////////////////////////////////////////////////////
39
40
#ifndef CONFIG_HAL_BOARD
41
#error CONFIG_HAL_BOARD must be defined to build ArduCopter
42
#endif
43
44
#ifndef ARMING_DELAY_SEC
45
# define ARMING_DELAY_SEC 2.0f
46
#endif
47
48
//////////////////////////////////////////////////////////////////////////////
49
// FRAME_CONFIG
50
//
51
#ifndef FRAME_CONFIG
52
# define FRAME_CONFIG MULTICOPTER_FRAME
53
#endif
54
55
/////////////////////////////////////////////////////////////////////////////////
56
// TradHeli defaults
57
#if FRAME_CONFIG == HELI_FRAME
58
# define RC_FAST_SPEED 125
59
# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_LOOK_AHEAD
60
#endif
61
62
//////////////////////////////////////////////////////////////////////////////
63
// PWM control
64
// default RC speed in Hz
65
#ifndef RC_FAST_SPEED
66
# define RC_FAST_SPEED 490
67
#endif
68
69
//////////////////////////////////////////////////////////////////////////////
70
// Rangefinder
71
//
72
73
#ifndef RANGEFINDER_FILT_DEFAULT
74
# define RANGEFINDER_FILT_DEFAULT 0.5f // filter for rangefinder distance
75
#endif
76
77
#ifndef SURFACE_TRACKING_TIMEOUT_MS
78
# 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
79
#endif
80
81
#ifndef MAV_SYSTEM_ID
82
# define MAV_SYSTEM_ID 1
83
#endif
84
85
// prearm GPS hdop check
86
#ifndef GPS_HDOP_GOOD_DEFAULT
87
# define GPS_HDOP_GOOD_DEFAULT 140 // minimum hdop that represents a good position. used during pre-arm checks if fence is enabled
88
#endif
89
90
// missing terrain data failsafe
91
#ifndef FS_TERRAIN_TIMEOUT_MS
92
#define FS_TERRAIN_TIMEOUT_MS 5000 // 5 seconds of missing terrain data will trigger failsafe (RTL)
93
#endif
94
95
// pre-arm baro vs inertial nav max alt disparity
96
#ifndef PREARM_MAX_ALT_DISPARITY_M
97
# define PREARM_MAX_ALT_DISPARITY_M 1.0 // barometer and inertial nav altitude must be within this many meters
98
#endif
99
100
//////////////////////////////////////////////////////////////////////////////
101
// EKF Failsafe
102
#ifndef FS_EKF_ACTION_DEFAULT
103
# define FS_EKF_ACTION_DEFAULT FS_EKF_ACTION_LAND // EKF failsafe triggers land by default
104
#endif
105
#ifndef FS_EKF_THRESHOLD_DEFAULT
106
# define FS_EKF_THRESHOLD_DEFAULT 0.8f // EKF failsafe's default compass and velocity variance threshold above which the EKF failsafe will be triggered
107
#endif
108
109
#ifndef EKF_ORIGIN_MAX_ALT_KM
110
# define EKF_ORIGIN_MAX_ALT_KM 50 // EKF origin and home must be within 50km vertically
111
#endif
112
113
#ifndef FS_EKF_FILT_DEFAULT
114
# define FS_EKF_FILT_DEFAULT 5.0f // frequency cutoff of EKF variance filters
115
#endif
116
117
//////////////////////////////////////////////////////////////////////////////
118
// Auto Tuning
119
#ifndef AUTOTUNE_ENABLED
120
# define AUTOTUNE_ENABLED 1
121
#endif
122
123
//////////////////////////////////////////////////////////////////////////////
124
// Nav-Guided - allows external nav computer to control vehicle
125
#ifndef AC_NAV_GUIDED
126
# define AC_NAV_GUIDED 1
127
#endif
128
129
//////////////////////////////////////////////////////////////////////////////
130
// Acro - fly vehicle in acrobatic mode
131
#ifndef MODE_ACRO_ENABLED
132
# define MODE_ACRO_ENABLED 1
133
#endif
134
135
//////////////////////////////////////////////////////////////////////////////
136
// Auto mode - allows vehicle to trace waypoints and perform automated actions
137
#ifndef MODE_AUTO_ENABLED
138
# define MODE_AUTO_ENABLED 1
139
#endif
140
141
//////////////////////////////////////////////////////////////////////////////
142
// Brake mode - bring vehicle to stop
143
#ifndef MODE_BRAKE_ENABLED
144
# define MODE_BRAKE_ENABLED 1
145
#endif
146
147
//////////////////////////////////////////////////////////////////////////////
148
// Circle - fly vehicle around a central point
149
#ifndef MODE_CIRCLE_ENABLED
150
# define MODE_CIRCLE_ENABLED 1
151
#endif
152
153
//////////////////////////////////////////////////////////////////////////////
154
// Drift - fly vehicle in altitude-held, coordinated-turn mode
155
#ifndef MODE_DRIFT_ENABLED
156
# define MODE_DRIFT_ENABLED 1
157
#endif
158
159
//////////////////////////////////////////////////////////////////////////////
160
// flip - fly vehicle in flip in pitch and roll direction mode
161
#ifndef MODE_FLIP_ENABLED
162
# define MODE_FLIP_ENABLED 1
163
#endif
164
165
//////////////////////////////////////////////////////////////////////////////
166
// Follow - follow another vehicle or GCS
167
#ifndef MODE_FOLLOW_ENABLED
168
#if AP_FOLLOW_ENABLED && AP_AVOIDANCE_ENABLED
169
#define MODE_FOLLOW_ENABLED 1
170
#else
171
#define MODE_FOLLOW_ENABLED 0
172
#endif
173
#endif
174
175
//////////////////////////////////////////////////////////////////////////////
176
// Guided mode - control vehicle's position or angles from GCS
177
#ifndef MODE_GUIDED_ENABLED
178
# define MODE_GUIDED_ENABLED 1
179
#endif
180
181
//////////////////////////////////////////////////////////////////////////////
182
// GuidedNoGPS mode - control vehicle's angles from GCS
183
#ifndef MODE_GUIDED_NOGPS_ENABLED
184
# define MODE_GUIDED_NOGPS_ENABLED 1
185
#endif
186
187
//////////////////////////////////////////////////////////////////////////////
188
// Loiter mode - allows vehicle to hold global position
189
#ifndef MODE_LOITER_ENABLED
190
# define MODE_LOITER_ENABLED 1
191
#endif
192
193
//////////////////////////////////////////////////////////////////////////////
194
// Position Hold - enable holding of global position
195
#ifndef MODE_POSHOLD_ENABLED
196
# define MODE_POSHOLD_ENABLED 1
197
#endif
198
199
//////////////////////////////////////////////////////////////////////////////
200
// RTL - Return To Launch
201
#ifndef MODE_RTL_ENABLED
202
# define MODE_RTL_ENABLED 1
203
#endif
204
205
//////////////////////////////////////////////////////////////////////////////
206
// SmartRTL - allows vehicle to retrace a (loop-eliminated) breadcrumb home
207
#ifndef MODE_SMARTRTL_ENABLED
208
# define MODE_SMARTRTL_ENABLED 1
209
#endif
210
211
//////////////////////////////////////////////////////////////////////////////
212
// Sport - fly vehicle in rate-controlled (earth-frame) mode
213
#ifndef MODE_SPORT_ENABLED
214
# define MODE_SPORT_ENABLED (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
215
#endif
216
217
//////////////////////////////////////////////////////////////////////////////
218
// System ID - conduct system identification tests on vehicle
219
#ifndef MODE_SYSTEMID_ENABLED
220
# define MODE_SYSTEMID_ENABLED HAL_LOGGING_ENABLED
221
#endif
222
223
//////////////////////////////////////////////////////////////////////////////
224
// Throw - fly vehicle after throwing it in the air
225
#ifndef MODE_THROW_ENABLED
226
# define MODE_THROW_ENABLED 1
227
#endif
228
229
//////////////////////////////////////////////////////////////////////////////
230
// ZigZag - allow vehicle to fly in a zigzag manner with predefined point A B
231
#ifndef MODE_ZIGZAG_ENABLED
232
# define MODE_ZIGZAG_ENABLED 1
233
#endif
234
235
//////////////////////////////////////////////////////////////////////////////
236
// Turtle - allow vehicle to be flipped over after a crash
237
#ifndef MODE_TURTLE_ENABLED
238
# define MODE_TURTLE_ENABLED HAL_DSHOT_ENABLED && FRAME_CONFIG != HELI_FRAME
239
#endif
240
241
//////////////////////////////////////////////////////////////////////////////
242
// Flowhold - use optical flow to hover in place
243
#ifndef MODE_FLOWHOLD_ENABLED
244
# define MODE_FLOWHOLD_ENABLED AP_OPTICALFLOW_ENABLED
245
#endif
246
247
//////////////////////////////////////////////////////////////////////////////
248
249
//////////////////////////////////////////////////////////////////////////////
250
// Weathervane - allow vehicle to yaw into wind
251
#ifndef WEATHERVANE_ENABLED
252
# define WEATHERVANE_ENABLED 1
253
#endif
254
255
//////////////////////////////////////////////////////////////////////////////
256
257
//////////////////////////////////////////////////////////////////////////////
258
// Autorotate - autonomous auto-rotation - helicopters only
259
#ifndef MODE_AUTOROTATE_ENABLED
260
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
261
#if FRAME_CONFIG == HELI_FRAME
262
#ifndef MODE_AUTOROTATE_ENABLED
263
# define MODE_AUTOROTATE_ENABLED 1
264
#endif
265
#else
266
# define MODE_AUTOROTATE_ENABLED 0
267
#endif
268
#else
269
# define MODE_AUTOROTATE_ENABLED 0
270
#endif
271
#endif
272
273
//////////////////////////////////////////////////////////////////////////////
274
// RADIO CONFIGURATION
275
//////////////////////////////////////////////////////////////////////////////
276
//////////////////////////////////////////////////////////////////////////////
277
278
279
//////////////////////////////////////////////////////////////////////////////
280
// FLIGHT_MODE
281
//
282
283
#ifndef FLIGHT_MODE_1
284
# define FLIGHT_MODE_1 Mode::Number::STABILIZE
285
#endif
286
#ifndef FLIGHT_MODE_2
287
# define FLIGHT_MODE_2 Mode::Number::STABILIZE
288
#endif
289
#ifndef FLIGHT_MODE_3
290
# define FLIGHT_MODE_3 Mode::Number::STABILIZE
291
#endif
292
#ifndef FLIGHT_MODE_4
293
# define FLIGHT_MODE_4 Mode::Number::STABILIZE
294
#endif
295
#ifndef FLIGHT_MODE_5
296
# define FLIGHT_MODE_5 Mode::Number::STABILIZE
297
#endif
298
#ifndef FLIGHT_MODE_6
299
# define FLIGHT_MODE_6 Mode::Number::STABILIZE
300
#endif
301
302
303
//////////////////////////////////////////////////////////////////////////////
304
// Throttle Failsafe
305
//
306
#ifndef FS_THR_VALUE_DEFAULT
307
# define FS_THR_VALUE_DEFAULT 975
308
#endif
309
310
//////////////////////////////////////////////////////////////////////////////
311
// Takeoff
312
//
313
#ifndef PILOT_TKOFF_ALT_DEFAULT
314
# define PILOT_TKOFF_ALT_DEFAULT 0 // default final alt above home for pilot initiated takeoff
315
#endif
316
317
318
//////////////////////////////////////////////////////////////////////////////
319
// Landing
320
//
321
#ifndef LAND_SPD_MS_DEFAULT
322
# define LAND_SPD_MS_DEFAULT 0.5f // the descent speed for the final stage of landing in m/s
323
#endif
324
#ifndef LAND_REPOSITION_DEFAULT
325
# define LAND_REPOSITION_DEFAULT 1 // by default the pilot can override roll/pitch during landing
326
#endif
327
#ifndef LAND_WITH_DELAY_MS
328
# define LAND_WITH_DELAY_MS 4000 // default delay (in milliseconds) when a land-with-delay is triggered during a failsafe event
329
#endif
330
#ifndef LAND_CANCEL_TRIGGER_THR
331
# define LAND_CANCEL_TRIGGER_THR 700 // land is cancelled by input throttle above 700
332
#endif
333
#ifndef LAND_RANGEFINDER_MIN_ALT_M
334
#define LAND_RANGEFINDER_MIN_ALT_M 2.0
335
#endif
336
337
// error if old LAND parameter default definitions are used
338
#ifdef LAND_SPEED
339
#error "LAND_SPEED definition replaced with LAND_SPD_MS_DEFAULT"
340
#endif
341
342
//////////////////////////////////////////////////////////////////////////////
343
// Landing Detector
344
//
345
#ifndef LAND_DETECTOR_TRIGGER_SEC
346
# define LAND_DETECTOR_TRIGGER_SEC 1.0f // number of seconds to detect a landing
347
#endif
348
#ifndef LAND_AIRMODE_DETECTOR_TRIGGER_SEC
349
# define LAND_AIRMODE_DETECTOR_TRIGGER_SEC 3.0f // number of seconds to detect a landing in air mode
350
#endif
351
#ifndef LAND_DETECTOR_MAYBE_TRIGGER_SEC
352
# 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)
353
#endif
354
#ifndef LAND_DETECTOR_ACCEL_LPF_CUTOFF
355
# define LAND_DETECTOR_ACCEL_LPF_CUTOFF 1.0f // frequency cutoff of land detector accelerometer filter
356
#endif
357
#ifndef LAND_DETECTOR_ACCEL_MAX
358
# define LAND_DETECTOR_ACCEL_MAX 1.0f // vehicle acceleration must be under 1m/s/s
359
#endif
360
#ifndef LAND_DETECTOR_VEL_Z_MAX
361
# define LAND_DETECTOR_VEL_Z_MAX 1.0f // vehicle vertical velocity must be under 1m/s
362
#endif
363
364
//////////////////////////////////////////////////////////////////////////////
365
// Flight mode definitions
366
//
367
368
// Acro Mode
369
#ifndef ACRO_LEVEL_MAX_ANGLE_RAD
370
# define ACRO_LEVEL_MAX_ANGLE_RAD radians(30.0) // maximum lean angle in trainer mode measured in radians
371
#endif
372
373
#ifdef ACRO_LEVEL_MAX_ANGLE
374
#error "Please update your hwdef to use ACRO_LEVEL_MAX_ANGLE_RAD, not ACRO_LEVEL_MAX_ANGLE"
375
#endif // ACRO_LEVEL_MAX_ANGLE
376
377
#ifndef ACRO_LEVEL_MAX_OVERSHOOT_RAD
378
# define ACRO_LEVEL_MAX_OVERSHOOT_RAD radians(10.0) // maximum overshoot angle in trainer mode when full roll or pitch stick is held in radians
379
#endif
380
381
#ifdef ACRO_LEVEL_MAX_OVERSHOOT
382
#error "Please update your hwdef to use ACRO_LEVEL_MAX_OVERSHOOT_RAD, not ACRO_LEVEL_MAX_OVERSHOOT"
383
#endif // ACRO_LEVEL_MAX_OVERSHOOT
384
385
#ifndef ACRO_BALANCE_ROLL
386
#define ACRO_BALANCE_ROLL 1.0f
387
#endif
388
389
#ifndef ACRO_BALANCE_PITCH
390
#define ACRO_BALANCE_PITCH 1.0f
391
#endif
392
393
#ifndef ACRO_RP_EXPO_DEFAULT
394
#define ACRO_RP_EXPO_DEFAULT 0.3f // ACRO roll and pitch expo parameter default
395
#endif
396
397
#ifndef ACRO_Y_EXPO_DEFAULT
398
#define ACRO_Y_EXPO_DEFAULT 0.0f // ACRO yaw expo parameter default
399
#endif
400
401
#ifndef ACRO_THR_MID_DEFAULT
402
#define ACRO_THR_MID_DEFAULT 0.0f
403
#endif
404
405
#ifndef ACRO_RP_RATE_DEFAULT
406
#define ACRO_RP_RATE_DEFAULT 360 // ACRO roll and pitch rotation rate parameter default in deg/s
407
#endif
408
409
#ifndef ACRO_Y_RATE_DEFAULT
410
#define ACRO_Y_RATE_DEFAULT 202.5 // ACRO yaw rotation rate parameter default in deg/s
411
#endif
412
413
// RTL Mode
414
#ifndef RTL_ALT_FINAL_M_DEFAULT
415
# define RTL_ALT_FINAL_M_DEFAULT 0 // the altitude, in meters, the vehicle will move to as the final stage of Returning to Launch. Set to zero to land.
416
#endif
417
418
#ifndef RTL_ALT_M_DEFAULT
419
# define RTL_ALT_M_DEFAULT 15 // default alt to return to home in meters, 0 = Maintain current altitude
420
#endif
421
422
#ifndef RTL_ALT_MIN_M
423
# define RTL_ALT_MIN_M 0.30 // min height above ground for RTL (i.e 0.3 m)
424
#endif
425
426
#ifndef RTL_CLIMB_MIN_M_DEFAULT
427
# define RTL_CLIMB_MIN_M_DEFAULT 0 // vehicle will always climb this many meters during the first stage of RTL
428
#endif
429
430
#ifndef RTL_CONE_SLOPE_DEFAULT
431
# define RTL_CONE_SLOPE_DEFAULT 3.0f // slope of RTL cone (height / distance). 0 = No cone
432
#endif
433
434
#ifndef RTL_MIN_CONE_SLOPE
435
# define RTL_MIN_CONE_SLOPE 0.5f // minimum slope of cone
436
#endif
437
438
#ifndef RTL_LOITER_TIME
439
# define RTL_LOITER_TIME 5000 // Time (in milliseconds) to loiter above home before beginning final descent
440
#endif
441
442
// error if old RTL parameter default definitions are used
443
#ifdef RTL_ALT_FINAL
444
#error "RTL_ALT_FINAL definition replaced with RTL_ALT_FINAL_M_DEFAULT"
445
#endif
446
#ifdef RTL_ALT
447
#error "RTL_ALT definition replaced with RTL_ALT_M_DEFAULT"
448
#endif
449
#ifdef RTL_CLIMB_MIN_DEFAULT
450
#error "RTL_CLIMB_MIN_DEFAULT definition replaced with RTL_CLIMB_MIN_M_DEFAULT"
451
#endif
452
453
// AUTO Mode
454
#ifndef WP_YAW_BEHAVIOR_DEFAULT
455
# define WP_YAW_BEHAVIOR_DEFAULT WP_YAW_BEHAVIOR_LOOK_AT_NEXT_WP_EXCEPT_RTL
456
#endif
457
458
#ifndef YAW_LOOK_AHEAD_MIN_SPEED_MS
459
# define YAW_LOOK_AHEAD_MIN_SPEED_MS 1 // minimum ground speed in m/s required before copter is aimed at ground course
460
#endif
461
462
// Super Simple mode
463
#ifndef SUPER_SIMPLE_RADIUS_M
464
# define SUPER_SIMPLE_RADIUS_M 10.0
465
#endif
466
467
//////////////////////////////////////////////////////////////////////////////
468
// Stabilize Rate Control
469
//
470
#ifndef ROLL_PITCH_YAW_INPUT_MAX
471
# define ROLL_PITCH_YAW_INPUT_MAX 4500 // roll, pitch and yaw input range
472
#endif
473
474
#ifdef DEFAULT_ANGLE_MAX
475
#error "DEFAULT_ANGLE_MAX definition replaced with AC_ATTITUDE_CONTROL_ANGLE_MAX_DEFAULT (in degrees)"
476
#endif
477
478
//////////////////////////////////////////////////////////////////////////////
479
// Stop mode defaults
480
//
481
#ifndef BRAKE_MODE_SPEED_Z_MS
482
# define BRAKE_MODE_SPEED_Z_MS 2.50 // z-axis speed in m/s in Brake Mode
483
#endif
484
#ifndef BRAKE_MODE_DECEL_RATE_MSS
485
# define BRAKE_MODE_DECEL_RATE_MSS 7.50 // acceleration rate in m/s/s in Brake Mode
486
#endif
487
488
//////////////////////////////////////////////////////////////////////////////
489
// PosHold parameter defaults
490
//
491
#ifndef POSHOLD_BRAKE_RATE_DEFAULT
492
#if FRAME_CONFIG == HELI_FRAME
493
# define POSHOLD_BRAKE_RATE_DEFAULT 4 // default POSHOLD_BRAKE_RATE param value for tradheli. Rotation rate during braking in deg/sec
494
# define POSHOLD_BRAKE_RATE_MIN 4 // default POSHOLD_BRAKE_RATE param value. Rotation rate during braking in deg/sec
495
#else
496
# define POSHOLD_BRAKE_RATE_DEFAULT 8 // default POSHOLD_BRAKE_RATE param value. Rotation rate during braking in deg/sec
497
# define POSHOLD_BRAKE_RATE_MIN 4 // default POSHOLD_BRAKE_RATE param value. Rotation rate during braking in deg/sec
498
#endif
499
#endif
500
#ifndef POSHOLD_BRAKE_ANGLE_DEFAULT
501
#if FRAME_CONFIG == HELI_FRAME
502
# define POSHOLD_BRAKE_ANGLE_DEFAULT 800 // default POSHOLD_BRAKE_ANGLE param value for tradheli. Max lean angle during braking in centi-degrees
503
#else
504
# define POSHOLD_BRAKE_ANGLE_DEFAULT 3000 // default POSHOLD_BRAKE_ANGLE param value. Max lean angle during braking in centi-degrees
505
#endif
506
#endif
507
508
//////////////////////////////////////////////////////////////////////////////
509
// Pilot control defaults
510
//
511
512
#ifndef THR_DZ_DEFAULT
513
# define THR_DZ_DEFAULT 100 // the deadzone above and below mid throttle while in althold or loiter
514
#endif
515
516
// default maximum vertical velocity and acceleration the pilot may request
517
#ifndef PILOT_SPEED_UP_DEFAULT
518
# define PILOT_SPEED_UP_DEFAULT 250 // maximum vertical velocity in cm/s
519
#endif
520
#ifndef PILOT_ACCEL_Z_DEFAULT
521
# define PILOT_ACCEL_Z_DEFAULT 250 // vertical acceleration in cm/s/s while altitude is under pilot control
522
#endif
523
524
#ifndef PILOT_Y_RATE_DEFAULT
525
# define PILOT_Y_RATE_DEFAULT 202.5 // yaw rotation rate parameter default in deg/s for all mode except ACRO
526
#endif
527
#ifndef PILOT_Y_EXPO_DEFAULT
528
# define PILOT_Y_EXPO_DEFAULT 0.0 // yaw expo parameter default for all mode except ACRO
529
#endif
530
531
#ifndef AUTO_DISARMING_DELAY
532
# define AUTO_DISARMING_DELAY 10
533
#endif
534
535
//////////////////////////////////////////////////////////////////////////////
536
// Throw mode configuration
537
//
538
#ifndef THROW_HIGH_SPEED_MS
539
# define THROW_HIGH_SPEED_MS 5.0 // vehicle much reach this total 3D speed in cm/s (or be free falling)
540
#endif
541
#ifndef THROW_VERTICAL_SPEED_MS
542
# define THROW_VERTICAL_SPEED_MS 0.5 // motors start when vehicle reaches this total 3D speed in cm/s
543
#endif
544
545
//////////////////////////////////////////////////////////////////////////////
546
// Logging control
547
//
548
549
// Default logging bitmask
550
#ifndef DEFAULT_LOG_BITMASK
551
# define DEFAULT_LOG_BITMASK \
552
MASK_LOG_ATTITUDE_MED | \
553
MASK_LOG_GPS | \
554
MASK_LOG_PM | \
555
MASK_LOG_CTUN | \
556
MASK_LOG_NTUN | \
557
MASK_LOG_RCIN | \
558
MASK_LOG_IMU | \
559
MASK_LOG_CMD | \
560
MASK_LOG_CURRENT | \
561
MASK_LOG_RCOUT | \
562
MASK_LOG_OPTFLOW | \
563
MASK_LOG_PID | \
564
MASK_LOG_COMPASS | \
565
MASK_LOG_CAMERA | \
566
MASK_LOG_MOTBATT
567
#endif
568
569
//////////////////////////////////////////////////////////////////////////////
570
// Fence, Rally and Terrain and AC_Avoidance defaults
571
//
572
573
#if MODE_FOLLOW_ENABLED && !AP_AVOIDANCE_ENABLED
574
#error Follow Mode relies on AP_AVOIDANCE_ENABLED which is disabled
575
#endif
576
577
#if MODE_AUTO_ENABLED && !MODE_GUIDED_ENABLED
578
#error ModeAuto requires ModeGuided which is disabled
579
#endif
580
581
#if MODE_AUTO_ENABLED && !MODE_CIRCLE_ENABLED
582
#error ModeAuto requires ModeCircle which is disabled
583
#endif
584
585
#if MODE_AUTO_ENABLED && !MODE_RTL_ENABLED
586
#error ModeAuto requires ModeRTL which is disabled
587
#endif
588
589
#if FRAME_CONFIG == HELI_FRAME && !MODE_ACRO_ENABLED
590
#error Helicopter frame requires acro mode support which is disabled
591
#endif
592
593
#if MODE_SMARTRTL_ENABLED && !MODE_RTL_ENABLED
594
#error SmartRTL requires ModeRTL which is disabled
595
#endif
596
597
#if HAL_ADSB_ENABLED && !MODE_GUIDED_ENABLED
598
#error ADSB requires ModeGuided which is disabled
599
#endif
600
601
#if MODE_FOLLOW_ENABLED && !MODE_GUIDED_ENABLED
602
#error Follow requires ModeGuided which is disabled
603
#endif
604
605
#if MODE_GUIDED_NOGPS_ENABLED && !MODE_GUIDED_ENABLED
606
#error ModeGuided-NoGPS requires ModeGuided which is disabled
607
#endif
608
609
//////////////////////////////////////////////////////////////////////////////
610
// Developer Items
611
//
612
613
#ifndef AP_COPTER_ADVANCED_FAILSAFE_ENABLED
614
# define AP_COPTER_ADVANCED_FAILSAFE_ENABLED 0
615
#endif
616
617
#ifndef AP_COPTER_AHRS_AUTO_TRIM_ENABLED
618
# define AP_COPTER_AHRS_AUTO_TRIM_ENABLED 1
619
#endif
620
621
#ifndef CH_MODE_DEFAULT
622
# define CH_MODE_DEFAULT 5
623
#endif
624
625
#ifndef TOY_MODE_ENABLED
626
#define TOY_MODE_ENABLED 0
627
#endif
628
629
#if TOY_MODE_ENABLED && FRAME_CONFIG == HELI_FRAME
630
#error Toy mode is not available on Helicopters
631
#endif
632
633
#ifndef HAL_FRAME_TYPE_DEFAULT
634
#define HAL_FRAME_TYPE_DEFAULT AP_Motors::MOTOR_FRAME_TYPE_X
635
#endif
636
637
#ifndef AC_CUSTOMCONTROL_MULTI_ENABLED
638
#define AC_CUSTOMCONTROL_MULTI_ENABLED FRAME_CONFIG == MULTICOPTER_FRAME && AP_CUSTOMCONTROL_ENABLED
639
#endif
640
641
#ifndef AC_PAYLOAD_PLACE_ENABLED
642
#define AC_PAYLOAD_PLACE_ENABLED 1
643
#endif
644
645
#ifndef USER_PARAMS_ENABLED
646
#define USER_PARAMS_ENABLED 0
647
#endif
648
649