2012-02-12 07:26:36 -04:00
|
|
|
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
|
|
|
|
|
|
|
|
/*
|
|
|
|
ArduCopter parameter definitions
|
|
|
|
|
|
|
|
This firmware is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define GSCALAR(v, name) { g.v.vtype, name, Parameters::k_param_ ## v, &g.v }
|
|
|
|
#define GGROUP(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &g.v, class::var_info }
|
|
|
|
#define GOBJECT(v, name, class) { AP_PARAM_GROUP, name, Parameters::k_param_ ## v, &v, class::var_info }
|
|
|
|
|
|
|
|
static const AP_Param::Info var_info[] PROGMEM = {
|
|
|
|
GSCALAR(format_version, "SYSID_SW_MREV"),
|
|
|
|
GSCALAR(software_type, "SYSID_SW_TYPE"),
|
|
|
|
|
|
|
|
GSCALAR(sysid_this_mav, "SYSID_THISMAV"),
|
|
|
|
GSCALAR(sysid_my_gcs, "SYSID_MYGCS"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
|
|
|
// @Param: SERIAL3_BAUD
|
|
|
|
// @DisplayName: Telemetry Baud Rate
|
|
|
|
// @Description: The baud rate used on the telemetry port
|
|
|
|
// @Values: 1:1200,2:2400,4:4800,9:9600,19:19200,38:38400,57:57600,111:111100,115:115200
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(serial3_baud, "SERIAL3_BAUD"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-24 15:11:16 -03:00
|
|
|
// @Param: ALT_HOLD_RTL
|
2012-04-24 13:37:33 -03:00
|
|
|
// @DisplayName: Alt Hold RTL
|
|
|
|
// @Description: This is the altitude the model will move to before Returning to Launch
|
|
|
|
// @Units: Meters
|
|
|
|
// @Range: 0 400
|
2012-04-25 13:23:46 -03:00
|
|
|
// @Increment: 1
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(RTL_altitude, "ALT_HOLD_RTL"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-24 15:11:16 -03:00
|
|
|
// @Param: SONAR_ENABLE
|
2012-04-24 13:37:33 -03:00
|
|
|
// @DisplayName: Enable Sonar
|
2012-04-28 22:50:41 -03:00
|
|
|
// @Description: Setting this to Enabled(1) will enable the sonar. Setting this to Disabled(0) will disable the sonar
|
2012-04-28 22:35:22 -03:00
|
|
|
// @Values: 0:Disabled,1:Enabled
|
2012-04-25 13:23:46 -03:00
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(sonar_enabled, "SONAR_ENABLE"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(sonar_type, "SONAR_TYPE"),
|
|
|
|
GSCALAR(battery_monitoring, "BATT_MONITOR"),
|
2012-04-28 14:14:17 -03:00
|
|
|
|
|
|
|
// @Param: VOLT_DIVIDER
|
|
|
|
// @DisplayName: Voltage Divider
|
|
|
|
// @Description: TODO
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(volt_div_ratio, "VOLT_DIVIDER"),
|
2012-04-28 14:14:17 -03:00
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(curr_amp_per_volt, "AMP_PER_VOLT"),
|
|
|
|
GSCALAR(input_voltage, "INPUT_VOLTS"),
|
2012-07-05 00:05:56 -03:00
|
|
|
|
|
|
|
// @Param: BATT_CAPACITY
|
|
|
|
// @DisplayName: Battery Capacity
|
|
|
|
// @Description: Battery capacity in milliamp-hours (mAh)
|
2012-07-19 02:56:13 -03:00
|
|
|
// @Units: mAh
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(pack_capacity, "BATT_CAPACITY"),
|
2012-04-28 14:14:17 -03:00
|
|
|
|
|
|
|
// @Param: MAG_ENABLE
|
|
|
|
// @DisplayName: Enable Compass
|
2012-04-28 22:50:41 -03:00
|
|
|
// @Description: Setting this to Enabled(1) will enable the compass. Setting this to Disabled(0) will disable the compass
|
2012-04-28 22:35:22 -03:00
|
|
|
// @Values: 0:Disabled,1:Enabled
|
2012-04-28 14:14:17 -03:00
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(compass_enabled, "MAG_ENABLE"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-28 14:14:17 -03:00
|
|
|
// @Param: FLOW_ENABLE
|
|
|
|
// @DisplayName: Enable Optical Flow
|
2012-04-28 22:50:41 -03:00
|
|
|
// @Description: Setting this to Enabled(1) will enable optical flow. Setting this to Disabled(0) will disable optical flow
|
2012-04-28 22:35:22 -03:00
|
|
|
// @Values: 0:Disabled,1:Enabled
|
2012-04-28 14:14:17 -03:00
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(optflow_enabled, "FLOW_ENABLE"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-28 14:14:17 -03:00
|
|
|
// @Param: LOW_VOLT
|
|
|
|
// @DisplayName: Low Voltage
|
|
|
|
// @Description: Set this to the voltage you want to represent low voltage
|
|
|
|
// @Range: 0 20
|
|
|
|
// @Increment: .1
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(low_voltage, "LOW_VOLT"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-28 14:14:17 -03:00
|
|
|
// @Param: SUPER_SIMPLE
|
|
|
|
// @DisplayName: Enable Super Simple Mode
|
2012-04-28 22:50:41 -03:00
|
|
|
// @Description: Setting this to Enabled(1) will enable Super Simple Mode. Setting this to Disabled(0) will disable Super Simple Mode
|
2012-04-28 22:35:22 -03:00
|
|
|
// @Values: 0:Disabled,1:Enabled
|
2012-04-28 14:14:17 -03:00
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(super_simple, "SUPER_SIMPLE"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-24 15:11:16 -03:00
|
|
|
// @Param: RTL_LAND
|
2012-04-24 13:37:33 -03:00
|
|
|
// @DisplayName: RTL Land
|
2012-04-28 22:50:41 -03:00
|
|
|
// @Description: Setting this to Enabled(1) will enable landing after RTL. Setting this to Disabled(0) will disable landing after RTL.
|
2012-04-28 22:35:22 -03:00
|
|
|
// @Values: 0:Disabled,1:Enabled
|
2012-04-25 13:23:46 -03:00
|
|
|
// @User: Standard
|
2012-07-03 21:33:03 -03:00
|
|
|
// @ DEPRICATED
|
2012-02-15 13:05:37 -04:00
|
|
|
GSCALAR(rtl_land_enabled, "RTL_LAND"),
|
2012-04-24 13:37:33 -03:00
|
|
|
|
2012-04-24 15:11:16 -03:00
|
|
|
// @Param: APPROACH_ALT
|
2012-04-24 13:37:33 -03:00
|
|
|
// @DisplayName: Alt Hold RTL
|
2012-07-05 03:33:40 -03:00
|
|
|
// @Description: This is the altitude the vehicle will move to before Returning to Launch
|
2012-04-24 13:37:33 -03:00
|
|
|
// @Units: Meters
|
|
|
|
// @Range: 1 10
|
2012-04-25 13:23:46 -03:00
|
|
|
// @Increment: .1
|
|
|
|
// @User: Standard
|
2012-04-15 18:51:41 -03:00
|
|
|
GSCALAR(rtl_approach_alt, "APPROACH_ALT"),
|
2012-02-15 13:05:37 -04:00
|
|
|
|
2012-07-03 21:33:03 -03:00
|
|
|
GSCALAR(tilt_comp, "TILT"),
|
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(waypoint_mode, "WP_MODE"),
|
|
|
|
GSCALAR(command_total, "WP_TOTAL"),
|
|
|
|
GSCALAR(command_index, "WP_INDEX"),
|
|
|
|
GSCALAR(command_nav_index, "WP_MUST_INDEX"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
|
|
|
// @Param: WP_RADIUS
|
|
|
|
// @DisplayName: Waypoint Radius
|
|
|
|
// @Description: Defines the distance from a waypoint, that when crossed indicates the wp has been hit.
|
|
|
|
// @Units: Meters
|
|
|
|
// @Range: 1 127
|
|
|
|
// @Increment: 1
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(waypoint_radius, "WP_RADIUS"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
|
|
|
// @Param: WP_LOITER_RAD
|
|
|
|
// @DisplayName: Waypoint Loiter Radius
|
|
|
|
// @Description: Defines the distance from the waypoint center, the vehicle will maintain during a loiter
|
|
|
|
// @Units: Meters
|
|
|
|
// @Range: 1 127
|
|
|
|
// @Increment: 1
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(loiter_radius, "WP_LOITER_RAD"),
|
|
|
|
GSCALAR(waypoint_speed_max, "WP_SPEED_MAX"),
|
|
|
|
GSCALAR(crosstrack_gain, "XTRK_GAIN_SC"),
|
|
|
|
GSCALAR(auto_land_timeout, "AUTO_LAND"),
|
|
|
|
|
2012-07-05 03:33:40 -03:00
|
|
|
// @Param: THR_MIN
|
|
|
|
// @DisplayName: Minimum Throttle
|
|
|
|
// @Description: The minimum throttle which the autopilot will apply.
|
|
|
|
// @Units: Percent
|
|
|
|
// @Range: 0 100
|
|
|
|
// @Increment: 1
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(throttle_min, "THR_MIN"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
|
|
|
// @Param: THR_MAX
|
|
|
|
// @DisplayName: Maximum Throttle
|
|
|
|
// @Description: The maximum throttle which the autopilot will apply.
|
|
|
|
// @Units: Percent
|
|
|
|
// @Range: 0 100
|
|
|
|
// @Increment: 1
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(throttle_max, "THR_MAX"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
|
|
|
// @Param: THR_FAILSAFE
|
|
|
|
// @DisplayName: Throttle Failsafe Enable
|
|
|
|
// @Description: The throttle failsafe allows you to configure a software failsafe activated by a setting on the throttle input channel
|
|
|
|
// @Values: 0:Disabled,1:Enabled
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(throttle_fs_enabled, "THR_FAILSAFE"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(throttle_fs_action, "THR_FS_ACTION"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
|
|
|
// @Param: THR_FS_VALUE
|
|
|
|
// @DisplayName: Throttle Failsafe Value
|
|
|
|
// @Description: The PWM level on channel 3 below which throttle sailsafe triggers
|
|
|
|
// @User: Standard
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(throttle_fs_value, "THR_FS_VALUE"),
|
2012-07-05 03:33:40 -03:00
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(throttle_cruise, "TRIM_THROTTLE"),
|
|
|
|
|
|
|
|
GSCALAR(flight_mode1, "FLTMODE1"),
|
|
|
|
GSCALAR(flight_mode2, "FLTMODE2"),
|
|
|
|
GSCALAR(flight_mode3, "FLTMODE3"),
|
|
|
|
GSCALAR(flight_mode4, "FLTMODE4"),
|
|
|
|
GSCALAR(flight_mode5, "FLTMODE5"),
|
|
|
|
GSCALAR(flight_mode6, "FLTMODE6"),
|
|
|
|
GSCALAR(simple_modes, "SIMPLE"),
|
|
|
|
|
2012-07-05 03:33:40 -03:00
|
|
|
// @Param: LOG_BITMASK
|
|
|
|
// @DisplayName: Log bitmask
|
|
|
|
// @Description: bitmap of log fields to enable
|
|
|
|
// @User: Advanced
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(log_bitmask, "LOG_BITMASK"),
|
|
|
|
GSCALAR(log_last_filenumber, "LOG_LASTFILE"),
|
2012-06-29 18:34:40 -03:00
|
|
|
// THOR
|
|
|
|
// Added to allow change of Rate in the Mission planner
|
|
|
|
GSCALAR(toy_yaw_rate, "TOY_RATE"),
|
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(esc_calibrate, "ESC"),
|
|
|
|
GSCALAR(radio_tuning, "TUNE"),
|
2012-02-15 15:47:54 -04:00
|
|
|
GSCALAR(radio_tuning_low, "TUNE_LOW"),
|
|
|
|
GSCALAR(radio_tuning_high, "TUNE_HIGH"),
|
2012-02-12 07:26:36 -04:00
|
|
|
GSCALAR(frame_orientation, "FRAME"),
|
|
|
|
GSCALAR(ch7_option, "CH7_OPT"),
|
2012-02-15 13:05:37 -04:00
|
|
|
GSCALAR(auto_slew_rate, "AUTO_SLEW"),
|
2012-02-12 07:26:36 -04:00
|
|
|
|
|
|
|
#if FRAME_CONFIG == HELI_FRAME
|
2012-02-18 07:57:51 -04:00
|
|
|
GGROUP(heli_servo_1, "HS1_", RC_Channel),
|
|
|
|
GGROUP(heli_servo_2, "HS2_", RC_Channel),
|
|
|
|
GGROUP(heli_servo_3, "HS3_", RC_Channel),
|
|
|
|
GGROUP(heli_servo_4, "HS4_", RC_Channel),
|
2012-02-12 07:26:36 -04:00
|
|
|
#endif
|
|
|
|
|
2012-07-10 19:39:13 -03:00
|
|
|
#if CAMERA == ENABLED
|
|
|
|
// @Group: CAM_
|
|
|
|
// @Path: ../libraries/AP_Camera/AP_Camera.cpp
|
|
|
|
GGROUP(camera, "CAM_", AP_Camera),
|
|
|
|
#endif
|
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
// RC channel
|
|
|
|
//-----------
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC1_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-02-12 07:26:36 -04:00
|
|
|
GGROUP(rc_1, "RC1_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC2_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-02-12 07:26:36 -04:00
|
|
|
GGROUP(rc_2, "RC2_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC3_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-02-12 07:26:36 -04:00
|
|
|
GGROUP(rc_3, "RC3_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC4_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-02-12 07:26:36 -04:00
|
|
|
GGROUP(rc_4, "RC4_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC5_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_5, "RC5_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC6_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_6, "RC6_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC7_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_7, "RC7_", RC_Channel),
|
2012-07-17 20:03:39 -03:00
|
|
|
// @Group: RC8_
|
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_8, "RC8_", RC_Channel),
|
2012-07-10 19:39:13 -03:00
|
|
|
|
2012-07-15 04:36:05 -03:00
|
|
|
#if MOUNT == ENABLED
|
|
|
|
// @Group: CAM_R_
|
2012-07-10 19:39:13 -03:00
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel_aux.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_camera_roll, "CAM_R_", RC_Channel_aux),
|
2012-07-10 19:39:13 -03:00
|
|
|
|
2012-07-15 04:36:05 -03:00
|
|
|
// @Group: CAM_P_
|
2012-07-10 19:39:13 -03:00
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel_aux.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_camera_pitch, "CAM_P_", RC_Channel_aux),
|
2012-07-10 19:39:13 -03:00
|
|
|
|
2012-07-15 04:36:05 -03:00
|
|
|
// @Group: CAM_Y_
|
2012-07-10 19:39:13 -03:00
|
|
|
// @Path: ../libraries/RC_Channel/RC_Channel_aux.cpp
|
2012-07-15 04:36:05 -03:00
|
|
|
GGROUP(rc_camera_yaw, "CAM_Y_", RC_Channel_aux),
|
|
|
|
#endif
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-24 15:11:16 -03:00
|
|
|
// @Param: RC_SPEED
|
2012-04-24 13:37:33 -03:00
|
|
|
// @DisplayName: ESC Update Speed
|
|
|
|
// @Description: This is the speed in Hertz that your ESCs will receive updates
|
|
|
|
// @Units: Hertz (Hz)
|
2012-04-26 20:26:14 -03:00
|
|
|
// @Values: 125,400,490
|
2012-04-25 13:23:46 -03:00
|
|
|
// @User: Advanced
|
2012-03-02 02:24:18 -04:00
|
|
|
GSCALAR(rc_speed, "RC_SPEED"),
|
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
// variable
|
|
|
|
//---------
|
2012-07-04 23:06:21 -03:00
|
|
|
GSCALAR(stabilize_d, "STAB_D"),
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-24 15:11:16 -03:00
|
|
|
// @Param: STAB_D_S
|
2012-04-24 13:37:33 -03:00
|
|
|
// @DisplayName: Stabilize D Schedule
|
|
|
|
// @Description: This value is a percentage of scheduling applied to the Stabilize D term.
|
|
|
|
// @Range: 0 1
|
2012-04-25 13:23:46 -03:00
|
|
|
// @Increment: .01
|
|
|
|
// @User: Advanced
|
2012-02-29 00:13:10 -04:00
|
|
|
GSCALAR(stabilize_d_schedule, "STAB_D_S"),
|
2012-04-24 13:37:33 -03:00
|
|
|
|
2012-02-15 15:29:25 -04:00
|
|
|
GSCALAR(acro_p, "ACRO_P"),
|
2012-02-19 01:08:17 -04:00
|
|
|
GSCALAR(axis_lock_p, "AXIS_P"),
|
|
|
|
GSCALAR(axis_enabled, "AXIS_ENABLE"),
|
2012-04-12 10:50:28 -03:00
|
|
|
GSCALAR(copter_leds_mode, "LED_MODE"),
|
2012-02-12 07:26:36 -04:00
|
|
|
|
|
|
|
// PID controller
|
|
|
|
//---------------
|
|
|
|
GGROUP(pid_rate_roll, "RATE_RLL_", AC_PID),
|
|
|
|
GGROUP(pid_rate_pitch, "RATE_PIT_", AC_PID),
|
|
|
|
GGROUP(pid_rate_yaw, "RATE_YAW_", AC_PID),
|
|
|
|
|
2012-02-15 13:05:37 -04:00
|
|
|
|
|
|
|
GGROUP(pid_loiter_rate_lat, "LOITER_LAT_", AC_PID),
|
|
|
|
GGROUP(pid_loiter_rate_lon, "LOITER_LON_", AC_PID),
|
|
|
|
|
|
|
|
GGROUP(pid_nav_lat, "NAV_LAT_", AC_PID),
|
|
|
|
GGROUP(pid_nav_lon, "NAV_LON_", AC_PID),
|
2012-02-12 07:26:36 -04:00
|
|
|
|
|
|
|
GGROUP(pid_throttle, "THR_RATE_", AC_PID),
|
|
|
|
GGROUP(pid_optflow_roll, "OF_RLL_", AC_PID),
|
|
|
|
GGROUP(pid_optflow_pitch, "OF_PIT_", AC_PID),
|
|
|
|
|
|
|
|
// PI controller
|
|
|
|
//--------------
|
|
|
|
GGROUP(pi_stabilize_roll, "STB_RLL_", APM_PI),
|
|
|
|
GGROUP(pi_stabilize_pitch, "STB_PIT_", APM_PI),
|
|
|
|
GGROUP(pi_stabilize_yaw, "STB_YAW_", APM_PI),
|
|
|
|
|
2012-02-15 13:05:37 -04:00
|
|
|
GGROUP(pi_alt_hold, "THR_ALT_", APM_PI),
|
2012-02-12 07:26:36 -04:00
|
|
|
GGROUP(pi_loiter_lat, "HLD_LAT_", APM_PI),
|
|
|
|
GGROUP(pi_loiter_lon, "HLD_LON_", APM_PI),
|
|
|
|
|
|
|
|
// variables not in the g class which contain EEPROM saved variables
|
2012-06-29 18:34:40 -03:00
|
|
|
|
2012-04-25 14:27:51 -03:00
|
|
|
// @Group: COMPASS_
|
2012-04-25 13:23:46 -03:00
|
|
|
// @Path: ../libraries/AP_Compass/Compass.cpp
|
2012-02-12 07:26:36 -04:00
|
|
|
GOBJECT(compass, "COMPASS_", Compass),
|
2012-04-25 13:23:46 -03:00
|
|
|
|
2012-07-19 02:56:13 -03:00
|
|
|
// @Group: INS_
|
|
|
|
// @Path: ../libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp
|
|
|
|
GOBJECT(ins, "INS_", AP_InertialSensor_Oilpan),
|
|
|
|
|
2012-02-15 13:05:37 -04:00
|
|
|
GOBJECT(gcs0, "SR0_", GCS_MAVLINK),
|
2012-02-17 19:39:57 -04:00
|
|
|
GOBJECT(gcs3, "SR3_", GCS_MAVLINK),
|
2012-04-25 13:23:46 -03:00
|
|
|
|
2012-04-25 14:27:51 -03:00
|
|
|
// @Group: IMU_
|
2012-04-25 13:23:46 -03:00
|
|
|
// @Path: ../libraries/AP_IMU/IMU.cpp
|
2012-04-16 07:55:03 -03:00
|
|
|
GOBJECT(imu, "IMU_", IMU),
|
2012-04-25 13:23:46 -03:00
|
|
|
|
2012-04-25 14:27:51 -03:00
|
|
|
// @Group: AHRS_
|
2012-04-25 13:23:46 -03:00
|
|
|
// @Path: ../libraries/AP_AHRS/AP_AHRS_DCM.cpp, ../libraries/AP_AHRS/AP_AHRS_Quaternion.cpp
|
2012-07-28 02:18:31 -03:00
|
|
|
#if DMP_ENABLED == ENABLED && CONFIG_APM_HARDWARE == APM_HARDWARE_APM2
|
|
|
|
GOBJECT(ahrs, "AHRS_", AP_AHRS_DCM),
|
|
|
|
#else
|
|
|
|
GOBJECT(ahrs, "AHRS_", AP_AHRS_MPU6000),
|
|
|
|
#endif
|
2012-04-04 10:55:07 -03:00
|
|
|
|
2012-07-15 04:36:05 -03:00
|
|
|
#if MOUNT == ENABLED
|
|
|
|
// @Group: MNT_
|
|
|
|
// @Path: ../libraries/AP_Mount/AP_Mount.cpp
|
|
|
|
GOBJECT(camera_mount, "MNT_", AP_Mount),
|
|
|
|
#endif
|
|
|
|
|
2012-06-29 02:10:35 -03:00
|
|
|
#ifdef DESKTOP_BUILD
|
|
|
|
GOBJECT(sitl, "SIM_", SITL),
|
|
|
|
#endif
|
|
|
|
|
2012-07-15 07:23:06 -03:00
|
|
|
//@Group: LIM_
|
2012-07-17 03:35:11 -03:00
|
|
|
//@Path: ../libraries/AP_Limits/AP_Limits.cpp,../libraries/AP_Limits/AP_Limit_GPSLock.cpp, ../libraries/AP_Limits/AP_Limit_Geofence.cpp, ../libraries/AP_Limits/AP_Limit_Altitude.cpp, ../libraries/AP_Limits/AP_Limit_Module.cpp
|
2012-07-14 23:26:17 -03:00
|
|
|
GOBJECT(limits, "LIM_", AP_Limits),
|
|
|
|
GOBJECT(gpslock_limit, "LIM_", AP_Limit_GPSLock),
|
|
|
|
GOBJECT(geofence_limit, "LIM_", AP_Limit_Geofence),
|
|
|
|
GOBJECT(altitude_limit, "LIM_", AP_Limit_Altitude),
|
|
|
|
|
2012-04-04 10:55:07 -03:00
|
|
|
#if FRAME_CONFIG == HELI_FRAME
|
2012-04-26 20:26:14 -03:00
|
|
|
// @Group: H_
|
|
|
|
// @Path: ../libraries/AP_Motors/AP_MotorsHeli.cpp
|
2012-04-16 07:55:03 -03:00
|
|
|
GOBJECT(motors, "H_", AP_MotorsHeli),
|
2012-04-04 10:55:07 -03:00
|
|
|
#else
|
2012-04-16 07:55:03 -03:00
|
|
|
GOBJECT(motors, "MOT_", AP_Motors),
|
2012-04-04 10:55:07 -03:00
|
|
|
#endif
|
2012-02-12 07:26:36 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static void load_parameters(void)
|
|
|
|
{
|
|
|
|
// setup the AP_Var subsystem for storage to EEPROM
|
|
|
|
if (!AP_Param::setup(var_info, sizeof(var_info)/sizeof(var_info[0]), WP_START_BYTE)) {
|
|
|
|
// this can only happen on startup, and its a definate coding
|
|
|
|
// error. Best not to continue so the programmer catches it
|
|
|
|
while (1) {
|
|
|
|
Serial.println_P(PSTR("ERROR: Failed to setup AP_Param"));
|
|
|
|
delay(1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-10 03:22:48 -03:00
|
|
|
// change the default for the AHRS_GPS_GAIN for ArduCopter
|
|
|
|
ahrs.gps_gain.set(0.0);
|
|
|
|
|
2012-02-12 07:26:36 -04:00
|
|
|
if (!g.format_version.load() ||
|
|
|
|
g.format_version != Parameters::k_format_version) {
|
|
|
|
|
|
|
|
// erase all parameters
|
|
|
|
Serial.printf_P(PSTR("Firmware change: erasing EEPROM...\n"));
|
|
|
|
AP_Param::erase_all();
|
|
|
|
|
|
|
|
// save the current format version
|
|
|
|
g.format_version.set_and_save(Parameters::k_format_version);
|
|
|
|
default_dead_zones();
|
|
|
|
Serial.println_P(PSTR("done."));
|
|
|
|
} else {
|
|
|
|
unsigned long before = micros();
|
|
|
|
// Load all auto-loaded EEPROM variables
|
|
|
|
AP_Param::load_all();
|
|
|
|
|
|
|
|
Serial.printf_P(PSTR("load_all took %luus\n"), micros() - before);
|
|
|
|
}
|
|
|
|
}
|