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/Parameters.h
Views: 1798
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 = 110,
132
k_param_gcs1,
133
k_param_sysid_this_mav,
134
k_param_sysid_my_gcs,
135
k_param_telem_delay,
136
k_param_gcs2,
137
k_param_serial_manager_old,
138
k_param_gcs3,
139
k_param_gcs_pid_mask,
140
k_param_gcs4,
141
k_param_gcs5,
142
k_param_gcs6,
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
204
// the k_param_* space is 9-bits in size
205
};
206
207
AP_Int16 format_version;
208
209
// Telemetry control
210
//
211
AP_Int16 sysid_this_mav;
212
AP_Int16 sysid_my_gcs;
213
AP_Int8 telem_delay;
214
215
AP_Float throttle_filt;
216
AP_Int16 throttle_behavior;
217
218
AP_Int8 failsafe_gcs; // ground station failsafe behavior
219
AP_Int16 gps_hdop_good; // GPS Hdop value at or below this value represent a good position
220
221
// Throttle
222
//
223
AP_Int8 failsafe_throttle;
224
AP_Int16 failsafe_throttle_value;
225
AP_Int16 throttle_deadzone;
226
227
// Flight modes
228
//
229
AP_Int8 flight_mode1;
230
AP_Int8 flight_mode2;
231
AP_Int8 flight_mode3;
232
AP_Int8 flight_mode4;
233
AP_Int8 flight_mode5;
234
AP_Int8 flight_mode6;
235
AP_Int8 flight_mode_chan;
236
AP_Int8 initial_mode;
237
238
// Misc
239
//
240
AP_Int32 log_bitmask;
241
AP_Int8 disarm_delay;
242
243
AP_Int8 fs_ekf_action;
244
AP_Int8 fs_crash_check;
245
AP_Float fs_ekf_thresh;
246
AP_Int16 gcs_pid_mask;
247
248
AP_Float max_vel_xy;
249
AP_Float max_vel_z;
250
AP_Float max_vel_yaw;
251
AP_Float max_pos_xy;
252
AP_Float max_pos_z;
253
AP_Float max_pos_yaw;
254
255
AP_Int8 simple_mode;
256
AP_Int16 dis_mask;
257
AP_Float pid_dz;
258
259
AP_Int8 rtl_alt_type;
260
261
AP_Int16 rc_speed; // speed of fast RC Channels in Hz
262
263
// Note: keep initializers here in the same order as they are declared
264
// above.
265
Parameters()
266
{
267
}
268
};
269
270
/*
271
2nd block of parameters, to avoid going past 256 top level keys
272
*/
273
class ParametersG2
274
{
275
public:
276
ParametersG2(void);
277
278
// var_info for holding Parameter information
279
static const struct AP_Param::GroupInfo var_info[];
280
281
// altitude at which nav control can start in takeoff
282
AP_Float wp_navalt_min;
283
284
// whether to enforce acceptance of packets only from sysid_my_gcs
285
AP_Int8 sysid_enforce;
286
287
// developer options
288
AP_Int32 dev_options;
289
290
// acro exponent parameters
291
AP_Float acro_y_expo;
292
293
// frame class
294
AP_Int8 frame_class;
295
296
// RC input channels
297
RC_Channels_Blimp rc_channels;
298
299
// control over servo output ranges
300
SRV_Channels servo_channels;
301
302
// Additional pilot velocity items
303
AP_Int16 pilot_speed_dn;
304
305
// Land alt final stage
306
AP_Int16 land_alt_low;
307
308
// vibration failsafe enable/disable
309
AP_Int8 fs_vibe_enabled;
310
311
// Failsafe options bitmask #36
312
AP_Int32 fs_options;
313
314
AP_Float fs_gcs_timeout;
315
};
316
317
extern const AP_Param::Info var_info[];
318
319