Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Blimp/Parameters.h
9580 views
1
#pragma once
2
3
#define AP_PARAM_VEHICLE_NAME blimp
4
5
#include <AP_Common/AP_Common.h>
6
#include "RC_Channel_Blimp.h"
7
#include <SRV_Channel/SRV_Channel.h>
8
9
// Global parameter class.
10
//
11
class Parameters
12
{
13
public:
14
// The version of the layout as described by the parameter enum.
15
//
16
// When changing the parameter enum in an incompatible fashion, this
17
// value should be incremented by one.
18
//
19
// The increment will prevent old parameters from being used incorrectly
20
// by newer code.
21
//
22
static const uint16_t k_format_version = 1;
23
24
// Parameter identities.
25
//
26
// The enumeration defined here is used to ensure that every parameter
27
// or parameter group has a unique ID number. This number is used by
28
// AP_Param to store and locate parameters in EEPROM.
29
//
30
// Note that entries without a number are assigned the next number after
31
// the entry preceding them. When adding new entries, ensure that they
32
// don't overlap.
33
//
34
// Try to group related variables together, and assign them a set
35
// range in the enumeration. Place these groups in numerical order
36
// at the end of the enumeration.
37
//
38
// WARNING: Care should be taken when editing this enumeration as the
39
// AP_Param load/save code depends on the values here to identify
40
// variables saved in EEPROM.
41
//
42
//
43
enum {
44
// Layout version number, always key zero.
45
//
46
k_param_format_version = 0,
47
k_param_ins, // libraries/AP_InertialSensor variables
48
k_param_NavEKF2,
49
k_param_g2, // 2nd block of parameters
50
k_param_NavEKF3,
51
k_param_can_mgr,
52
k_param_osd,
53
54
// simulation
55
k_param_sitl = 10,
56
57
// barometer object (needed for SITL)
58
k_param_barometer,
59
60
// scheduler object (for debugging)
61
k_param_scheduler,
62
63
// BoardConfig object
64
k_param_BoardConfig,
65
66
// GPS object
67
k_param_gps,
68
69
// Parachute object
70
k_param_parachute,
71
72
// Landing gear object
73
k_param_landinggear,
74
75
// Input Management object
76
k_param_input_manager,
77
78
// Misc
79
k_param_gps_hdop_good,
80
k_param_battery,
81
k_param_poshold_brake_rate,
82
k_param_poshold_brake_angle_max,
83
k_param_pilot_accel_z,
84
k_param_fs_ekf_thresh,
85
k_param_terrain,
86
k_param_throttle_deadzone,
87
k_param_log_bitmask,
88
k_param_throttle_filt,
89
k_param_throttle_behavior,
90
k_param_pilot_takeoff_alt, //unused
91
92
// AP_ADSB Library
93
k_param_adsb,
94
k_param_notify,
95
96
//PID Controllers
97
k_param_pid_vel_xy = 32,
98
k_param_pid_vel_z,
99
k_param_pid_vel_yaw,
100
k_param_pid_pos_xy,
101
k_param_pid_pos_z,
102
k_param_pid_pos_yaw,
103
104
//Position & Velocity controller params
105
k_param_max_vel_xy = 50,
106
k_param_max_vel_z,
107
k_param_max_vel_yaw,
108
k_param_max_pos_xy,
109
k_param_max_pos_z,
110
k_param_max_pos_yaw,
111
k_param_simple_mode,
112
k_param_dis_mask,
113
k_param_pid_dz,
114
115
//
116
// 90: misc2
117
//
118
k_param_motors = 90,
119
k_param_disarm_delay,
120
k_param_fs_crash_check,
121
k_param_throw_motor_start,
122
k_param_rtl_alt_type,
123
k_param_avoid,
124
k_param_avoidance_adsb,
125
126
// 97: RSSI
127
k_param_rssi = 97,
128
129
// 110: Telemetry control
130
//
131
k_param_gcs0_unused = 110, // unused in ArduPilot-4.7
132
k_param_gcs1_unused, // unused in ArduPilot-4.7
133
k_param_sysid_this_mav_old,
134
k_param_sysid_my_gcs_old,
135
k_param_telem_delay_old, // used for conversion in ArduPilot-4.7
136
k_param_gcs2_unused, // unused in ArduPilot-4.7
137
k_param_serial_manager_old,
138
k_param_gcs3_unused, // unused in ArduPilot-4.7
139
k_param_gcs_pid_mask,
140
k_param_gcs4_unused, // unused in ArduPilot-4.7
141
k_param_gcs5_unused, // unused in ArduPilot-4.7
142
k_param_gcs6_unused, // unused in ArduPilot-4.7
143
144
//
145
// 135 : reserved for Solo until features merged with master
146
//
147
k_param_rtl_speed_cms = 135,
148
k_param_fs_batt_curr_rtl,
149
k_param_rtl_cone_slope, // 137
150
151
//
152
// 140: Sensor parameters
153
//
154
k_param_compass,
155
k_param_frame_type, //unused
156
k_param_ahrs, // AHRS group // 159
157
158
//
159
// 160: Navigation parameters
160
//
161
k_param_rtl_altitude = 160,
162
k_param_rtl_loiter_time,
163
k_param_rtl_alt_final,
164
165
166
//
167
// Camera and mount parameters
168
//
169
k_param_camera = 165,
170
k_param_camera_mount,
171
172
//
173
// 170: Radio settings
174
//
175
k_param_failsafe_throttle = 170,
176
k_param_failsafe_throttle_value,
177
k_param_radio_tuning, // unused
178
k_param_rc_speed = 192,
179
k_param_failsafe_gcs,
180
k_param_rcmap, // 199
181
182
//
183
// 200: flight modes
184
//
185
k_param_flight_mode1 = 200,
186
k_param_flight_mode2,
187
k_param_flight_mode3,
188
k_param_flight_mode4,
189
k_param_flight_mode5,
190
k_param_flight_mode6,
191
k_param_flight_mode_chan,
192
k_param_initial_mode,
193
194
//
195
// 220: Misc
196
//
197
k_param_fs_ekf_action = 220,
198
k_param_arming,
199
200
k_param_logger = 253, // 253 - Logging Group
201
202
k_param_vehicle = 257, // vehicle common block of parameters
203
k_param__gcs = 258,
204
205
// the k_param_* space is 9-bits in size
206
};
207
208
AP_Int16 format_version;
209
210
AP_Float throttle_filt;
211
AP_Int16 throttle_behavior;
212
213
AP_Int8 failsafe_gcs; // ground station failsafe behavior
214
AP_Int16 gps_hdop_good; // GPS Hdop value at or below this value represent a good position
215
216
// Throttle
217
//
218
AP_Int8 failsafe_throttle;
219
AP_Int16 failsafe_throttle_value;
220
AP_Int16 throttle_deadzone;
221
222
// Flight modes
223
//
224
AP_Int8 flight_mode1;
225
AP_Int8 flight_mode2;
226
AP_Int8 flight_mode3;
227
AP_Int8 flight_mode4;
228
AP_Int8 flight_mode5;
229
AP_Int8 flight_mode6;
230
AP_Int8 flight_mode_chan;
231
AP_Int8 initial_mode;
232
233
// Misc
234
//
235
AP_Int32 log_bitmask;
236
AP_Int8 disarm_delay;
237
238
AP_Int8 fs_ekf_action;
239
AP_Int8 fs_crash_check;
240
AP_Float fs_ekf_thresh;
241
AP_Int16 gcs_pid_mask;
242
243
AP_Float max_vel_xy;
244
AP_Float max_vel_z;
245
AP_Float max_vel_yaw;
246
AP_Float max_pos_xy;
247
AP_Float max_pos_z;
248
AP_Float max_pos_yaw;
249
250
AP_Int8 simple_mode;
251
AP_Int16 dis_mask;
252
AP_Float pid_dz;
253
254
AP_Int8 rtl_alt_type;
255
256
AP_Int16 rc_speed; // speed of fast RC Channels in Hz
257
258
// Note: keep initializers here in the same order as they are declared
259
// above.
260
Parameters()
261
{
262
}
263
};
264
265
/*
266
2nd block of parameters, to avoid going past 256 top level keys
267
*/
268
class ParametersG2
269
{
270
public:
271
ParametersG2(void);
272
273
// var_info for holding Parameter information
274
static const struct AP_Param::GroupInfo var_info[];
275
276
// altitude at which nav control can start in takeoff
277
AP_Float wp_navalt_min;
278
279
// developer options
280
AP_Int32 dev_options;
281
282
// acro exponent parameters
283
AP_Float acro_y_expo;
284
285
// frame class
286
AP_Int8 frame_class;
287
288
// RC input channels
289
RC_Channels_Blimp rc_channels;
290
291
// control over servo output ranges
292
SRV_Channels servo_channels;
293
294
// Additional pilot velocity items
295
AP_Int16 pilot_speed_dn;
296
297
// Land alt final stage
298
AP_Int16 land_alt_low;
299
300
// vibration failsafe enable/disable
301
AP_Int8 fs_vibe_enabled;
302
303
// Failsafe options bitmask #36
304
AP_Int32 fs_options;
305
306
AP_Float fs_gcs_timeout;
307
};
308
309
extern const AP_Param::Info var_info[];
310
311