1b9887221f9edee90a5765ec635896fd05245e28
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / ARDroneLib / Soft / Common / config_keys.h
1 /******************************************************************************
2  *                        COPYRIGHT PARROT 2010
3  ******************************************************************************
4  * PARROT A.R.Drone SDK
5  *---------------------------------------------------------------------------*/
6 /**
7  * @file   config_keys.h
8  * @brief  Definition of all the configuration values for the drone.
9  *
10  * This file mainly consists in a list of ARDRONE_CONFIG_KEY_xxx macros
11  * whose arguments describe the available configuration values.
12  * By redefining those macros and including this file anywhere else in the
13  * project, it is possible to build a set of C variables, functions or macros
14  * based on the configuration descriptions.
15  *
16  ******************************************************************************/
17
18
19 #ifndef CFG_STRINGIFY
20         #define CFG_STRINGIFY(x) #x
21 #endif
22
23
24
25 #ifndef CONFIG_KEYS_STRING_TYPE_DEFINED
26 #define CONFIG_KEYS_STRING_TYPE_DEFINED
27   #define STRING_T_SIZE 128
28   typedef char string_t[STRING_T_SIZE+1];
29 #endif // ! CONFIG_KEYS_STRING_TYPE_DEFINED
30 #include <Maths/maths.h>
31 #include <VLIB/video_codec.h>
32
33 #ifndef CONFIG_KEYS_RW_ENUM_DEFINED
34 #define CONFIG_KEYS_RW_ENUM_DEFINED
35
36 /**
37  * @brief Describes the behaviour of a drone configuration variable.
38  */
39   enum {
40     K_READ    = 1,     /*!< Value can be read by a remote client */
41     K_WRITE   = 1<<1,  /*!< Value can be written by a remote client */
42     K_NOBIND  = 1<<2,  /*!< Data are stored to the config.ini file, but not read from this file at startup.*/
43     K_SHALLOW = 1<<3,  /*!< Data will no be stored to the config.ini file, nor read from this file at startup.*/
44   };
45
46   enum {
47           CAT_COMMON = 0,
48           CAT_APPLI  ,
49           CAT_USER   ,
50           CAT_SESSION,
51           NB_CONFIG_CATEGORIES
52   };
53
54   /* Stephane - multiconfiguration support */
55
56           /* Size of the hexadecimal ID representing a custom configuration - example : 1234abcd */
57                 #define CUSTOM_CONFIGURATION_ID_LENGTH 8
58
59                 typedef struct{
60                         char id[CUSTOM_CONFIGURATION_ID_LENGTH+1];
61                         char description[1024];
62                 }custom_configuration_t;
63
64                 typedef struct
65                 {
66                         custom_configuration_t* list;
67                         int nb_configurations;
68                 }custom_configuration_list_t;
69
70                 extern const char * configuration_switching_commands[NB_CONFIG_CATEGORIES+1];
71                 extern const char * custom_configuration_headers[NB_CONFIG_CATEGORIES+1];
72                 extern const char * custom_configuration_id_keys[NB_CONFIG_CATEGORIES+1];
73                 extern custom_configuration_list_t available_configurations[NB_CONFIG_CATEGORIES];
74
75                 /**
76                  * \brief Checks if a character is valid in a custom configuration identifier.
77                  * Currently it checks if the character is an hexadecimal digit.
78                  */
79                 C_RESULT configuration_check_config_id_char(const char session_id_char);
80                 /**
81                  * \brief Checks if a string is a valid custom configuration identifier.
82                  * Currently it checks if the string is made of 8 hexa. digits.
83                  */
84                 C_RESULT configuration_check_config_id(const char * session_id);
85
86
87   /* Stephane - multiconfiguration support */
88
89
90 #endif // ! CONFIG_KEYS_RW_ENUM_DEFINED
91
92 #ifndef CONFIG_KEYS_DEFINES_DEFINED
93
94 # ifdef INSIDE_FLIGHT
95 #   define MAX_EULER_ANGLES_REF (12000.0f * MDEG_TO_RAD)     /* EA control, maximum reference [rad] */
96 #   define MAX_OUTDOOR_EULER_ANGLES_REF (20000.0f * MDEG_TO_RAD)     /* EA control, maximum reference [rad] */
97 # else
98 #   define MAX_EULER_ANGLES_REF (12000.0f * MDEG_TO_RAD)    /* EA control, maximum reference [rad] */
99 #   define MAX_OUTDOOR_EULER_ANGLES_REF (20000.0f * MDEG_TO_RAD)     /* EA control, maximum reference [rad] */
100 # endif
101
102 # define CONFIG_KEYS_DEFINES_DEFINED
103 //Calibration renvoye par le PIC dans le cas ou il n'en a pas recut
104 #define DEFAULT_PWM_REF_GYRO                500
105 #define DEFAULT_GYRO_OFFSET_THR_X           4.0
106 #define DEFAULT_GYRO_OFFSET_THR_Y           4.0
107 #define DEFAULT_GYRO_OFFSET_THR_Z           0.5
108 //#define default_accs_offset          {{{ -2048.0f, 2048.0f, 2048.0f}}}
109 //#define default_accs_gain            {1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f }
110 //#define default_gyros_offset         {{{ 1662.5f, 1662.5f, 1662.5f}}}
111 //#define default_gyros_gains          {{{ 395.0f * MDEG_TO_RAD, -395.0f * MDEG_TO_RAD, -207.5f * MDEG_TO_RAD }}}
112 //#define default_gyros110_offset      {{ 1662.5f, 1662.5f}}
113 //#define default_gyros110_gains       {{ 87.5f * MDEG_TO_RAD, -87.5f * MDEG_TO_RAD }}
114 #define default_motor_version         "0.0"
115 #define NULL_MAC                                          "00:00:00:00:00:00"
116
117 /* Selection of navdata blocks sent when starting the 'demo' mode */
118 #define default_navdata_options ( NAVDATA_OPTION_MASK(NAVDATA_DEMO_TAG)|NAVDATA_OPTION_MASK(NAVDATA_VISION_DETECT_TAG) )
119
120 #define COMPILE_TIME ( (2010-1970)*(365+(2010-1970)/4)*(24)*(3600) )
121
122 extern const vector31_t default_accs_offset;
123 extern const matrix33_t default_accs_gain;
124 extern const vector31_t default_gyros_offset;
125 extern const vector31_t default_gyros_gains;
126 extern const vector21_t default_gyros110_offset;
127 extern const vector21_t default_gyros110_gains;
128
129 #define default_pwm_ref_gyro          DEFAULT_PWM_REF_GYRO
130 #define default_gyro_offset_thr_x     DEFAULT_GYRO_OFFSET_THR_X
131 #define default_gyro_offset_thr_y     DEFAULT_GYRO_OFFSET_THR_Y
132 #define default_gyro_offset_thr_z     DEFAULT_GYRO_OFFSET_THR_Z
133
134 #define default_euler_angle_ref_max             MAX_EULER_ANGLES_REF
135 #define default_outdoor_euler_angle_ref_max     MAX_OUTDOOR_EULER_ANGLES_REF
136 # define default_altitude_max                   (3000)
137 # define default_altitude_min                   (50)
138 # define default_control_trim_z                 (0.0f * MDEG_TO_RAD)
139 # define default_control_iphone_tilt    (20000.0f * MDEG_TO_RAD)
140 # define default_control_vz_max                 (700.0f)
141 # define default_outdoor_control_vz_max (1000.0f)
142 # define default_control_yaw                    (100000.0f * MDEG_TO_RAD)
143 # define default_outdoor_control_yaw    (200000.0f * MDEG_TO_RAD)
144
145 #define default_enemy_colors                    (ARDRONE_DETECTION_COLOR_ORANGE_GREEN)
146 #define default_groundstripe_colors     (ARDRONE_DETECTION_COLOR_ARRACE_FINISH_LINE)
147 #define default_detect_type                             CAD_TYPE_NONE
148
149 #define DEFAULT_APPLICATION_DESC "Default application configuration"
150 #define DEFAULT_PROFILE_DESC "Default profile configuration"
151 #define DEFAULT_SESSION_DESC "Default session configuration"
152
153 #define CUSTOM_CONFIGURATION_DELETE_ALL_CMD "all"
154
155 #ifndef CARD_VERSION
156 #define CARD_VERSION 0x00
157 #endif
158
159 #endif // ! CONFIG_KEYS_DEFINES_DEFINED
160
161 /* ---- List of configuration properties - see the Developer Guide for a comprehensive description ---- */
162
163 /* Parameters attributes are : (KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, RW_CUSTOM, DEFAULT, CALLBACK)
164  * Key : category of parameter, used by the ini file parser ; corresponds to a section inside the config.ini file.
165  * Name : name of the parameter as found in the AT*CONFIG command, and as expected by ARDRONE_TOOL_CONFIGURATION_ADDEVENT
166
167  */
168 #ifndef ARDRONE_CONFIG_KEY_IMM
169         #define ARDRONE_CONFIG_KEY_IMM(a,b,c,d,e,f,g,h)
170 #endif
171 #ifndef ARDRONE_CONFIG_KEY_STR
172         #define ARDRONE_CONFIG_KEY_STR(a,b,c,d,e,f,g,h)
173 #endif
174 #ifndef ARDRONE_CONFIG_KEY_REF
175         #define ARDRONE_CONFIG_KEY_REF(a,b,c,d,e,f,g,h)
176 #endif
177
178 #ifndef ARDRONE_CONFIG_KEY_IMM_a10
179 #define ARDRONE_CONFIG_KEY_IMM_a10(a,b,c,d,e,f,g,h,i,j) ARDRONE_CONFIG_KEY_IMM(a,b,c,d,e,f,h,i)
180 #endif
181 #ifndef ARDRONE_CONFIG_KEY_STR_a10
182 #define ARDRONE_CONFIG_KEY_STR_a10(a,b,c,d,e,f,g,h,i,j) ARDRONE_CONFIG_KEY_STR(a,b,c,d,e,f,h,i)
183 #endif
184 #ifndef ARDRONE_CONFIG_KEY_REF_a10
185 #define ARDRONE_CONFIG_KEY_REF_a10(a,b,c,d,e,f,g,h,i,j) ARDRONE_CONFIG_KEY_REF(a,b,c,d,e,f,h,i)
186 #endif
187
188 ARDRONE_CONFIG_KEY_IMM_a10("general", num_version_config,  INI_INT,      int32_t,    int32_t*,     (K_READ|K_NOBIND), 0, CURRENT_NUM_VERSION_CONFIG,      default_config_callback,CAT_COMMON)
189 ARDRONE_CONFIG_KEY_IMM_a10("general", num_version_mb,      INI_INT,      int32_t,    int32_t*,     (K_READ|K_NOBIND), 0, CARD_VERSION,                          default_config_callback,CAT_COMMON)
190 ARDRONE_CONFIG_KEY_STR_a10("general", num_version_soft,    INI_STRING,   string_t,   char*,        (K_READ|K_NOBIND), 0, CURRENT_NUM_VERSION_SOFT,        default_config_callback,CAT_COMMON)
191 ARDRONE_CONFIG_KEY_STR_a10("general", soft_build_date,            INI_STRING,   string_t,   char*, (K_READ|K_NOBIND), 0, CURRENT_BUILD_DATE,              default_config_callback,CAT_COMMON)
192 ARDRONE_CONFIG_KEY_STR_a10("general", motor1_soft,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
193 ARDRONE_CONFIG_KEY_STR_a10("general", motor1_hard,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
194 ARDRONE_CONFIG_KEY_STR_a10("general", motor1_supplier,    INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
195 ARDRONE_CONFIG_KEY_STR_a10("general", motor2_soft,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
196 ARDRONE_CONFIG_KEY_STR_a10("general", motor2_hard,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
197 ARDRONE_CONFIG_KEY_STR_a10("general", motor2_supplier,    INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
198 ARDRONE_CONFIG_KEY_STR_a10("general", motor3_soft,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
199 ARDRONE_CONFIG_KEY_STR_a10("general", motor3_hard,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
200 ARDRONE_CONFIG_KEY_STR_a10("general", motor3_supplier,     INI_STRING,   string_t,   char*,        (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
201 ARDRONE_CONFIG_KEY_STR_a10("general", motor4_soft,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
202 ARDRONE_CONFIG_KEY_STR_a10("general", motor4_hard,        INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
203 ARDRONE_CONFIG_KEY_STR_a10("general", motor4_supplier,    INI_STRING,   string_t,   char*,         (K_READ|K_NOBIND), 0, default_motor_version,           default_config_callback,CAT_COMMON)
204 ARDRONE_CONFIG_KEY_STR_a10("general", ardrone_name,        INI_STRING,   string_t,   char*,        (K_READ|K_WRITE ), 0, "My ARDrone",                    default_config_callback,CAT_COMMON)
205 ARDRONE_CONFIG_KEY_IMM_a10("general", flying_time,         INI_INT,      uint32_t,   uint32_t*,    (K_READ)         , 0, 0,                               default_config_callback,CAT_COMMON)
206 ARDRONE_CONFIG_KEY_IMM_a10("general", navdata_demo,        INI_BOOLEAN,  bool_t,     bool_t*,      (K_READ|K_WRITE) , 0, FALSE,                           navdata_demo_config_callback,CAT_COMMON)
207 ARDRONE_CONFIG_KEY_IMM_a10("general", navdata_options,     INI_INT,      int32_t,    int32_t*,     (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), default_navdata_options, navdata_options_config_callback, CAT_APPLI)
208 ARDRONE_CONFIG_KEY_IMM_a10("general", com_watchdog,        INI_INT,      int32_t,    int32_t*,     (K_READ|K_WRITE) , 0, COM_INPUT_LANDING_TIME,          default_config_callback,CAT_COMMON)
209 ARDRONE_CONFIG_KEY_IMM_a10("general", video_enable,        INI_BOOLEAN,  bool_t,     bool_t*,      (K_READ|K_WRITE) , 0, TRUE,                            default_config_callback,CAT_COMMON)
210 ARDRONE_CONFIG_KEY_IMM_a10("general", vision_enable,       INI_BOOLEAN,  bool_t,     bool_t*,      (K_READ|K_WRITE) , 0, TRUE,                            default_config_callback,CAT_COMMON)
211 ARDRONE_CONFIG_KEY_IMM_a10("general", vbat_min,            INI_INT,      int32_t,    int32_t*,     (K_READ|K_NOBIND), 0, VBAT_POWERING_OFF,               default_config_callback,CAT_COMMON)
212
213 ARDRONE_CONFIG_KEY_REF_a10("control", accs_offset,         INI_VECTOR,   vector31_t, vector31_t*, (K_READ|K_NOBIND), 0, default_accs_offset,              default_config_callback,CAT_COMMON)
214 ARDRONE_CONFIG_KEY_REF_a10("control", accs_gains,          INI_MATRIX,   matrix33_t, matrix33_t*, (K_READ|K_NOBIND), 0, default_accs_gain,              default_config_callback,CAT_COMMON)
215 ARDRONE_CONFIG_KEY_REF_a10("control", gyros_offset,        INI_VECTOR,   vector31_t, vector31_t*, (K_READ|K_NOBIND), 0, default_gyros_offset,           default_config_callback,CAT_COMMON)
216 ARDRONE_CONFIG_KEY_REF_a10("control", gyros_gains,         INI_VECTOR,   vector31_t, vector31_t*, (K_READ|K_NOBIND), 0, default_gyros_gains,            default_config_callback,CAT_COMMON)
217 ARDRONE_CONFIG_KEY_REF_a10("control", gyros110_offset,     INI_VECTOR21, vector21_t, vector21_t*, (K_READ|K_NOBIND), 0, default_gyros110_offset,        default_config_callback,CAT_COMMON)
218 ARDRONE_CONFIG_KEY_REF_a10("control", gyros110_gains,      INI_VECTOR21, vector21_t, vector21_t*, (K_READ|K_NOBIND), 0, default_gyros110_gains,         default_config_callback,CAT_COMMON)
219 ARDRONE_CONFIG_KEY_IMM_a10("control", gyro_offset_thr_x,   INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_NOBIND), 0, default_gyro_offset_thr_x,      default_config_callback,CAT_COMMON)
220 ARDRONE_CONFIG_KEY_IMM_a10("control", gyro_offset_thr_y,   INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_NOBIND), 0, default_gyro_offset_thr_y,      default_config_callback,CAT_COMMON)
221 ARDRONE_CONFIG_KEY_IMM_a10("control", gyro_offset_thr_z,   INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_NOBIND), 0, default_gyro_offset_thr_z,      default_config_callback,CAT_COMMON)
222 ARDRONE_CONFIG_KEY_IMM_a10("control", pwm_ref_gyros,       INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, default_pwm_ref_gyro,           default_config_callback,CAT_COMMON)
223 ARDRONE_CONFIG_KEY_IMM_a10("control", control_level,       INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE) , (K_READ|K_WRITE), 0,               default_config_callback,CAT_APPLI)
224 ARDRONE_CONFIG_KEY_IMM_a10("control", shield_enable,       INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE) , 0, 1,                                 default_config_callback,CAT_COMMON)
225 ARDRONE_CONFIG_KEY_IMM_a10("control", euler_angle_max,     INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE) , (K_READ|K_WRITE), default_euler_angle_ref_max,       control_changed_config_callback,CAT_USER)
226 ARDRONE_CONFIG_KEY_IMM_a10("control", altitude_max,        INI_INT,     int32_t,    int32_t*,     (K_READ|K_WRITE) , 0, default_altitude_max,              default_config_callback,CAT_COMMON)
227 ARDRONE_CONFIG_KEY_IMM_a10("control", altitude_min,        INI_INT,     int32_t,    int32_t*,     (K_READ|K_WRITE) , 0, default_altitude_min,              default_config_callback,CAT_COMMON)
228 ARDRONE_CONFIG_KEY_IMM_a10("control", control_trim_z,      INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE) , (K_READ|K_WRITE), default_control_trim_z,            default_config_callback,CAT_USER)
229 ARDRONE_CONFIG_KEY_IMM_a10("control", control_iphone_tilt, INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE) , (K_READ|K_WRITE), default_control_iphone_tilt,       default_config_callback,CAT_USER)
230 ARDRONE_CONFIG_KEY_IMM_a10("control", control_vz_max,      INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE) , (K_READ|K_WRITE), default_control_vz_max,           control_changed_config_callback,CAT_USER)
231 ARDRONE_CONFIG_KEY_IMM_a10("control", control_yaw,         INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE) , (K_READ|K_WRITE), default_control_yaw,               control_changed_config_callback,CAT_USER)
232 ARDRONE_CONFIG_KEY_IMM_a10("control", outdoor,            INI_BOOLEAN,  bool_t,     bool_t*,      (K_READ|K_WRITE) , 0, FALSE,                                           control_config_callback,CAT_COMMON)
233 ARDRONE_CONFIG_KEY_IMM_a10("control", flight_without_shell,INI_BOOLEAN,  bool_t,     bool_t*,     (K_READ|K_WRITE) , 0, FALSE,                                       default_config_callback,CAT_COMMON)
234 ARDRONE_CONFIG_KEY_IMM_a10("control", brushless,                  INI_BOOLEAN,  bool_t, bool_t*,  (K_READ|K_WRITE) , 0, TRUE,                                            default_config_callback,CAT_COMMON)
235 ARDRONE_CONFIG_KEY_IMM_a10("control", autonomous_flight,   INI_BOOLEAN,  bool_t,     bool_t*,     (K_READ|K_WRITE) , 0, FALSE,                                       default_config_callback,CAT_COMMON)
236 ARDRONE_CONFIG_KEY_IMM_a10("control", manual_trim,                INI_BOOLEAN,  bool_t,     bool_t*,     (K_READ|K_WRITE), (K_READ|K_WRITE), FALSE,                                          default_config_callback,CAT_USER)
237
238 ARDRONE_CONFIG_KEY_IMM_a10("control", indoor_euler_angle_max,     INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE), (K_READ|K_WRITE), default_euler_angle_ref_max,default_config_callback,CAT_USER)
239 ARDRONE_CONFIG_KEY_IMM_a10("control", indoor_control_vz_max,      INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE), (K_READ|K_WRITE), default_control_vz_max,     default_config_callback,CAT_USER)
240 ARDRONE_CONFIG_KEY_IMM_a10("control", indoor_control_yaw,         INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE), (K_READ|K_WRITE), default_control_yaw,        default_config_callback,CAT_USER)
241 ARDRONE_CONFIG_KEY_IMM_a10("control", outdoor_euler_angle_max,    INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE), (K_READ|K_WRITE), default_outdoor_euler_angle_ref_max, default_config_callback,CAT_USER)
242 ARDRONE_CONFIG_KEY_IMM_a10("control", outdoor_control_vz_max,     INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE), (K_READ|K_WRITE), default_outdoor_control_vz_max,      default_config_callback,CAT_USER)
243 ARDRONE_CONFIG_KEY_IMM_a10("control", outdoor_control_yaw,        INI_FLOAT,    float32_t,  float32_t*,  (K_READ|K_WRITE), (K_READ|K_WRITE), default_outdoor_control_yaw,         default_config_callback,CAT_USER)
244
245 ARDRONE_CONFIG_KEY_IMM_a10("control", flying_mode,        INI_INT,    int32_t,  int32_t*,   (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), (K_READ|K_WRITE), 0,                   flying_mode_config_callback,CAT_SESSION)
246 ARDRONE_CONFIG_KEY_STR_a10("control", flight_anim,        INI_STRING,    string_t,  char*,  (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), 0, "0,0",         flight_animation_selection_callback,CAT_COMMON)
247
248 ARDRONE_CONFIG_KEY_STR_a10("network", ssid_single_player,  INI_STRING,   string_t,   char*,       (K_READ|K_WRITE), 0, WIFI_NETWORK_NAME,               default_config_callback, CAT_COMMON)
249 ARDRONE_CONFIG_KEY_STR_a10("network", ssid_multi_player,   INI_STRING,   string_t,   char*,       (K_READ|K_WRITE), 0,  WIFI_NETWORK_NAME,               default_config_callback, CAT_COMMON)
250 ARDRONE_CONFIG_KEY_IMM_a10("network", wifi_mode,           INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0,  WIFI_MODE_INFRA,                               default_config_callback, CAT_COMMON)
251 ARDRONE_CONFIG_KEY_IMM_a10("network", secure,              INI_BOOLEAN,  bool_t,     bool_t*,     (K_READ|K_WRITE), 0,  0,                               default_config_callback, CAT_COMMON)
252 ARDRONE_CONFIG_KEY_STR_a10("network", passkey,             INI_STRING,   string_t,   char*,       (K_READ|K_WRITE), 0,  "",                              default_config_callback, CAT_COMMON)
253 ARDRONE_CONFIG_KEY_IMM_a10("network", navdata_port,        INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, NAVDATA_PORT,                    default_config_callback, CAT_COMMON)
254 ARDRONE_CONFIG_KEY_IMM_a10("network", video_port,          INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, VIDEO_PORT,                      default_config_callback, CAT_COMMON)
255 ARDRONE_CONFIG_KEY_IMM_a10("network", at_port,             INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, AT_PORT,                         default_config_callback, CAT_COMMON)
256 ARDRONE_CONFIG_KEY_IMM_a10("network", cmd_port,            INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, CONTROL_PORT,                    default_config_callback, CAT_COMMON)
257 ARDRONE_CONFIG_KEY_STR_a10("network", owner_mac,           INI_STRING,   string_t,   char*,       (K_READ|K_WRITE), 0, NULL_MAC,                        owner_mac_callback,      CAT_COMMON)
258 ARDRONE_CONFIG_KEY_IMM_a10("network", owner_ip_address,    INI_INT,      uint32_t,   uint32_t*,   (K_READ|K_WRITE), 0, 0,                               default_config_callback, CAT_COMMON)
259 ARDRONE_CONFIG_KEY_IMM_a10("network", local_ip_address,    INI_INT,      uint32_t,   uint32_t*,   (K_READ|K_WRITE), 0, 0,                               default_config_callback, CAT_COMMON)
260 ARDRONE_CONFIG_KEY_IMM_a10("network", broadcast_address,   INI_INT,      uint32_t,   uint32_t*,   (K_READ|K_WRITE), 0, 0,                               default_config_callback, CAT_COMMON)
261
262 ARDRONE_CONFIG_KEY_IMM_a10("pic",     ultrasound_freq,     INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, ADC_CMD_SELECT_ULTRASOUND_25Hz,    ultrasound_freq_callback,CAT_COMMON)
263 ARDRONE_CONFIG_KEY_IMM_a10("pic",     ultrasound_watchdog, INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, 3,                                 default_config_callback,CAT_COMMON)
264 ARDRONE_CONFIG_KEY_IMM_a10("pic",     pic_version        , INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, 0x00040030,              default_config_callback,CAT_COMMON)
265
266 ARDRONE_CONFIG_KEY_IMM_a10("video",   camif_fps,           INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, 15,                     default_config_callback,CAT_COMMON)
267 ARDRONE_CONFIG_KEY_IMM_a10("video",   camif_buffers,       INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, CAMIF_NUM_BUFFERS,      default_config_callback,CAT_COMMON)
268 ARDRONE_CONFIG_KEY_IMM_a10("video",   num_trackers,        INI_INT,      int32_t,    int32_t*,    (K_READ|K_NOBIND), 0, 12,                     default_config_callback,CAT_COMMON)
269 ARDRONE_CONFIG_KEY_IMM_a10("video",   bitrate,             INI_INT,      int32_t,    int32_t*,    (K_READ|K_SHALLOW), (K_READ|K_WRITE), 0,               default_config_callback,CAT_APPLI)
270 ARDRONE_CONFIG_KEY_IMM_a10("video",   bitrate_ctrl_mode,   INI_INT,      int32_t,    int32_t*,    (K_READ|K_SHALLOW), (K_READ|K_WRITE), 0,               default_config_callback,CAT_APPLI)
271 ARDRONE_CONFIG_KEY_IMM_a10("video",   video_codec,               INI_INT,      int32_t,    int32_t*,    (K_READ|K_SHALLOW), (K_READ|K_WRITE), UVLC_CODEC,                codec_config_callback, CAT_APPLI)
272 ARDRONE_CONFIG_KEY_IMM_a10("video",   video_channel,       INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), (K_READ|K_WRITE), 0,   video_channel_selection_callback,CAT_SESSION)
273
274 ARDRONE_CONFIG_KEY_STR_a10("leds",    leds_anim,           INI_STRING,   string_t,    char*,      (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), 0, "0,0,0",           leds_animation_selection_callback,CAT_COMMON)
275
276 ARDRONE_CONFIG_KEY_IMM_a10("detect",  enemy_colors,       INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, default_enemy_colors,                      default_config_callback,CAT_COMMON)
277 ARDRONE_CONFIG_KEY_IMM_a10("detect",  groundstripe_colors, INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), (K_READ|K_WRITE), default_groundstripe_colors,       default_config_callback,CAT_SESSION)
278 ARDRONE_CONFIG_KEY_IMM_a10("detect",  enemy_without_shell, INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, 0,                                                        default_config_callback,CAT_COMMON)
279 ARDRONE_CONFIG_KEY_IMM_a10("detect",  detect_type,                INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE|K_NOBIND), (K_READ|K_WRITE|K_NOBIND), default_detect_type,      detect_type_callback,CAT_SESSION)
280 ARDRONE_CONFIG_KEY_IMM_a10("detect",  detections_select_h,                INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE|K_NOBIND), (K_READ|K_WRITE), 0,      detections_select_callback,CAT_SESSION)
281 ARDRONE_CONFIG_KEY_IMM_a10("detect",  detections_select_v_hsync,  INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE|K_NOBIND), (K_READ|K_WRITE), 0,      detections_select_callback,CAT_SESSION)
282 ARDRONE_CONFIG_KEY_IMM_a10("detect",  detections_select_v,                INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE|K_NOBIND), (K_READ|K_WRITE), 0,      detections_select_callback,CAT_SESSION)
283
284 ARDRONE_CONFIG_KEY_IMM_a10("syslog",  output,              INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, (UART_PRINT|WIFI_PRINT|FLASH_PRINT), default_config_callback,CAT_COMMON)
285 ARDRONE_CONFIG_KEY_IMM_a10("syslog",  max_size,            INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, (100*1024),                          default_config_callback,CAT_COMMON)
286 ARDRONE_CONFIG_KEY_IMM_a10("syslog",  nb_files,            INI_INT,      int32_t,    int32_t*,    (K_READ|K_WRITE), 0, 5,                                 default_config_callback,CAT_COMMON)
287
288 /*- Multi configuration management -*/
289 ARDRONE_CONFIG_KEY_STR_a10("custom",  application_id,      INI_STRING,   string_t,    char*,    (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), (K_READ|K_WRITE), "00000000",     default_config_callback,CAT_SESSION)
290 ARDRONE_CONFIG_KEY_STR_a10("custom",  application_desc,    INI_STRING,   string_t,    char*,    (K_READ|K_WRITE), (K_READ|K_WRITE), DEFAULT_APPLICATION_DESC,          application_desc_callback,CAT_APPLI)
291
292 ARDRONE_CONFIG_KEY_STR_a10("custom",  profile_id,          INI_STRING,   string_t,    char*,    (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), (K_READ|K_WRITE), "00000000",     default_config_callback,CAT_SESSION)
293 ARDRONE_CONFIG_KEY_STR_a10("custom",  profile_desc,        INI_STRING,   string_t,    char*,    (K_READ|K_WRITE),  (K_READ|K_WRITE),                                  DEFAULT_PROFILE_DESC,              profile_desc_callback,CAT_USER)
294
295 ARDRONE_CONFIG_KEY_STR_a10("custom",  session_id,          INI_STRING,   string_t,    char*,    (K_READ|K_WRITE|K_NOBIND|K_SHALLOW), (K_READ|K_WRITE), "00000000",     default_config_callback,CAT_SESSION)
296 ARDRONE_CONFIG_KEY_STR_a10("custom",  session_desc,        INI_STRING,   string_t,    char*,    (K_READ|K_WRITE),  (K_READ|K_WRITE),                                  DEFAULT_SESSION_DESC,              session_desc_callback,CAT_SESSION)
297
298 /* Prevents a further inclusion of config_keys from generating garbage code */
299 #undef ARDRONE_CONFIG_KEY_IMM_a10
300 #undef ARDRONE_CONFIG_KEY_REF_a10
301 #undef ARDRONE_CONFIG_KEY_STR_a10
302 #undef ARDRONE_CONFIG_KEY_IMM
303 #undef ARDRONE_CONFIG_KEY_REF
304 #undef ARDRONE_CONFIG_KEY_STR