CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Blimp/config.h
Views: 1798
1
//
2
#pragma once
3
4
//////////////////////////////////////////////////////////////////////////////
5
//
6
// Default and automatic configuration details.
7
//
8
//
9
#include "defines.h"
10
11
//////////////////////////////////////////////////////////////////////////////
12
//////////////////////////////////////////////////////////////////////////////
13
// HARDWARE CONFIGURATION AND CONNECTIONS
14
//////////////////////////////////////////////////////////////////////////////
15
//////////////////////////////////////////////////////////////////////////////
16
17
#ifndef CONFIG_HAL_BOARD
18
#error CONFIG_HAL_BOARD must be defined to build Blimp
19
#endif
20
21
#ifndef ARMING_DELAY_SEC
22
# define ARMING_DELAY_SEC 2.0f
23
#endif
24
25
//////////////////////////////////////////////////////////////////////////////
26
// PWM control
27
// default RC speed in Hz
28
#ifndef RC_FAST_SPEED
29
# define RC_FAST_SPEED 490
30
#endif
31
32
#ifndef MAV_SYSTEM_ID
33
# define MAV_SYSTEM_ID 1
34
#endif
35
36
// prearm GPS hdop check
37
#ifndef GPS_HDOP_GOOD_DEFAULT
38
# define GPS_HDOP_GOOD_DEFAULT 140 // minimum hdop that represents a good position. used during pre-arm checks if fence is enabled
39
#endif
40
41
// Radio failsafe while using RC_override
42
#ifndef FS_RADIO_RC_OVERRIDE_TIMEOUT_MS
43
# define FS_RADIO_RC_OVERRIDE_TIMEOUT_MS 1000 // RC Radio failsafe triggers after 1 second while using RC_override from ground station
44
#endif
45
46
// Radio failsafe
47
#ifndef FS_RADIO_TIMEOUT_MS
48
#define FS_RADIO_TIMEOUT_MS 500 // RC Radio Failsafe triggers after 500 milliseconds with No RC Input
49
#endif
50
51
// missing terrain data failsafe
52
#ifndef FS_TERRAIN_TIMEOUT_MS
53
#define FS_TERRAIN_TIMEOUT_MS 5000 // 5 seconds of missing terrain data will trigger failsafe (RTL)
54
#endif
55
56
// pre-arm baro vs inertial nav max alt disparity
57
#ifndef PREARM_MAX_ALT_DISPARITY_CM
58
# define PREARM_MAX_ALT_DISPARITY_CM 100 // barometer and inertial nav altitude must be within this many centimeters
59
#endif
60
61
//////////////////////////////////////////////////////////////////////////////
62
// EKF Failsafe
63
#ifndef FS_EKF_ACTION_DEFAULT
64
# define FS_EKF_ACTION_DEFAULT FS_EKF_ACTION_LAND // EKF failsafe triggers land by default
65
#endif
66
#ifndef FS_EKF_THRESHOLD_DEFAULT
67
# define FS_EKF_THRESHOLD_DEFAULT 0.8f // EKF failsafe's default compass and velocity variance threshold above which the EKF failsafe will be triggered
68
#endif
69
70
#ifndef EKF_ORIGIN_MAX_DIST_M
71
# define EKF_ORIGIN_MAX_DIST_M 50000 // EKF origin and waypoints (including home) must be within 50km
72
#endif
73
74
//////////////////////////////////////////////////////////////////////////////
75
// FLIGHT_MODE
76
//
77
#ifndef FLIGHT_MODE_1
78
# define FLIGHT_MODE_1 Mode::Number::MANUAL
79
#endif
80
#ifndef FLIGHT_MODE_2
81
# define FLIGHT_MODE_2 Mode::Number::MANUAL
82
#endif
83
#ifndef FLIGHT_MODE_3
84
# define FLIGHT_MODE_3 Mode::Number::MANUAL
85
#endif
86
#ifndef FLIGHT_MODE_4
87
# define FLIGHT_MODE_4 Mode::Number::MANUAL
88
#endif
89
#ifndef FLIGHT_MODE_5
90
# define FLIGHT_MODE_5 Mode::Number::MANUAL
91
#endif
92
#ifndef FLIGHT_MODE_6
93
# define FLIGHT_MODE_6 Mode::Number::MANUAL
94
#endif
95
96
//////////////////////////////////////////////////////////////////////////////
97
// Throttle Failsafe
98
//
99
#ifndef FS_THR_VALUE_DEFAULT
100
# define FS_THR_VALUE_DEFAULT 975
101
#endif
102
103
//////////////////////////////////////////////////////////////////////////////
104
// Throttle control defaults
105
//
106
#ifndef THR_DZ_DEFAULT
107
# define THR_DZ_DEFAULT 100 // the deadzone above and below mid throttle while in althold or loiter
108
#endif
109
110
#ifndef AUTO_DISARMING_DELAY
111
# define AUTO_DISARMING_DELAY 10
112
#endif
113
114
// Default logging bitmask
115
#ifndef DEFAULT_LOG_BITMASK
116
# define DEFAULT_LOG_BITMASK \
117
MASK_LOG_ATTITUDE_MED | \
118
MASK_LOG_GPS | \
119
MASK_LOG_PM | \
120
MASK_LOG_CTUN | \
121
MASK_LOG_NTUN | \
122
MASK_LOG_RCIN | \
123
MASK_LOG_IMU | \
124
MASK_LOG_CMD | \
125
MASK_LOG_CURRENT | \
126
MASK_LOG_RCOUT | \
127
MASK_LOG_OPTFLOW | \
128
MASK_LOG_COMPASS | \
129
MASK_LOG_CAMERA | \
130
MASK_LOG_MOTBATT
131
#endif
132
133
#ifndef CH_MODE_DEFAULT
134
# define CH_MODE_DEFAULT 5
135
#endif
136
137
#ifndef HAL_FRAME_TYPE_DEFAULT
138
#define HAL_FRAME_TYPE_DEFAULT Fins::MOTOR_FRAME_TYPE_AIRFISH
139
#endif
140
141