2011-12-26 19:48:26 -04:00
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
2016-02-17 21:26:00 -04:00
|
|
|
#pragma once
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2015-08-11 03:28:40 -03:00
|
|
|
#include <AP_Common/AP_Common.h>
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Global parameter class.
|
|
|
|
//
|
|
|
|
class Parameters {
|
|
|
|
public:
|
2012-06-14 22:54:13 -03:00
|
|
|
|
|
|
|
/*
|
2012-08-21 23:19:51 -03:00
|
|
|
* The value of k_format_version determines whether the existing
|
|
|
|
* eeprom data is considered valid. You should only change this
|
|
|
|
* value under the following circumstances:
|
|
|
|
*
|
|
|
|
* 1) the meaning of an existing eeprom parameter changes
|
|
|
|
*
|
|
|
|
* 2) the value of an existing k_param_* enum value changes
|
|
|
|
*
|
|
|
|
* Adding a new parameter should _not_ require a change to
|
|
|
|
* k_format_version except under special circumstances. If you
|
|
|
|
* change it anyway then all ArduPlane users will need to reload all
|
|
|
|
* their parameters. We want that to be an extremely rare
|
|
|
|
* thing. Please do not just change it "just in case".
|
|
|
|
*
|
|
|
|
* To determine if a k_param_* value has changed, use the rules of
|
|
|
|
* C++ enums to work out the value of the neighboring enum
|
|
|
|
* values. If you don't know the C++ enum rules then please ask for
|
|
|
|
* help.
|
|
|
|
*/
|
2012-06-14 22:54:13 -03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
// STOP!!! DO NOT CHANGE THIS VALUE UNTIL YOU FULLY UNDERSTAND THE
|
|
|
|
// COMMENTS ABOVE. IF UNSURE, ASK ANOTHER DEVELOPER!!!
|
2012-06-13 16:28:13 -03:00
|
|
|
static const uint16_t k_format_version = 13;
|
2012-06-14 22:54:13 -03:00
|
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2012-08-21 23:19:51 -03:00
|
|
|
// The parameter software_type is set up solely for ground station use
|
|
|
|
// and identifies the software type (eg ArduPilotMega versus ArduCopterMega)
|
|
|
|
// GCS will interpret values 0-9 as ArduPilotMega. Developers may use
|
|
|
|
// values within that range to identify different branches.
|
|
|
|
//
|
|
|
|
static const uint16_t k_software_type = 0; // 0 for APM trunk
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
enum {
|
|
|
|
// Layout version number, always key zero.
|
|
|
|
//
|
|
|
|
k_param_format_version = 0,
|
2012-08-21 23:19:51 -03:00
|
|
|
k_param_software_type,
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_num_resets,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Misc
|
|
|
|
//
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_auto_trim = 10,
|
2014-01-13 21:52:22 -04:00
|
|
|
k_param_log_bitmask_old, // unused
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_pitch_trim_cd,
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_mix_mode,
|
|
|
|
k_param_reverse_elevons,
|
|
|
|
k_param_reverse_ch1_elevon,
|
|
|
|
k_param_reverse_ch2_elevon,
|
|
|
|
k_param_flap_1_percent,
|
|
|
|
k_param_flap_1_speed,
|
|
|
|
k_param_flap_2_percent,
|
|
|
|
k_param_flap_2_speed,
|
|
|
|
k_param_reset_switch_chan,
|
2013-04-29 01:19:53 -03:00
|
|
|
k_param_manual_level, // unused
|
2012-08-21 23:19:51 -03:00
|
|
|
k_param_land_pitch_cd,
|
2012-11-07 02:20:22 -04:00
|
|
|
k_param_ins_old, // *** Deprecated, remove with next eeprom number change
|
2012-08-08 19:53:29 -03:00
|
|
|
k_param_stick_mixing,
|
2012-08-08 21:33:16 -03:00
|
|
|
k_param_reset_mission_chan,
|
2012-08-21 23:19:51 -03:00
|
|
|
k_param_land_flare_alt,
|
|
|
|
k_param_land_flare_sec,
|
2013-04-11 21:25:46 -03:00
|
|
|
k_param_crosstrack_min_distance, // unused
|
2013-04-12 07:27:56 -03:00
|
|
|
k_param_rudder_steer, // unused
|
2012-09-09 06:36:35 -03:00
|
|
|
k_param_throttle_nudge,
|
2012-09-19 03:22:53 -03:00
|
|
|
k_param_alt_offset,
|
2012-11-07 02:20:22 -04:00
|
|
|
k_param_ins, // libraries/AP_InertialSensor variables
|
2013-02-09 07:40:16 -04:00
|
|
|
k_param_takeoff_throttle_min_speed,
|
2013-03-08 23:41:04 -04:00
|
|
|
k_param_takeoff_throttle_min_accel,
|
2013-04-12 07:27:56 -03:00
|
|
|
k_param_takeoff_heading_hold, // unused
|
|
|
|
k_param_level_roll_limit,
|
2013-03-30 00:38:43 -03:00
|
|
|
k_param_hil_servos,
|
2013-04-05 01:22:00 -03:00
|
|
|
k_param_vtail_output,
|
2013-04-11 21:25:46 -03:00
|
|
|
k_param_nav_controller,
|
2013-04-28 07:49:53 -03:00
|
|
|
k_param_elevon_output,
|
2013-05-05 02:31:41 -03:00
|
|
|
k_param_att_controller,
|
2013-05-25 05:27:57 -03:00
|
|
|
k_param_mixing_gain,
|
2013-06-04 00:34:58 -03:00
|
|
|
k_param_scheduler,
|
2013-06-24 09:40:10 -03:00
|
|
|
k_param_relay,
|
2013-06-26 05:36:53 -03:00
|
|
|
k_param_takeoff_throttle_delay,
|
2015-09-17 09:32:06 -03:00
|
|
|
k_param_skip_gyro_cal, // unused
|
2013-09-13 01:37:48 -03:00
|
|
|
k_param_auto_fbw_steer,
|
2013-09-13 04:43:00 -03:00
|
|
|
k_param_waypoint_max_radius,
|
2013-10-03 09:01:43 -03:00
|
|
|
k_param_ground_steer_alt,
|
|
|
|
k_param_ground_steer_dps,
|
2014-04-18 16:19:13 -03:00
|
|
|
k_param_rally_limit_km_old, //unused anymore -- just holding this index
|
2013-11-23 03:27:20 -04:00
|
|
|
k_param_hil_err_limit,
|
2014-06-27 00:05:14 -03:00
|
|
|
k_param_sonar_old, // unused
|
2014-01-13 21:52:22 -04:00
|
|
|
k_param_log_bitmask,
|
2014-01-19 21:58:49 -04:00
|
|
|
k_param_BoardConfig,
|
2015-08-28 03:01:32 -03:00
|
|
|
k_param_rssi_range, // unused, replaced by rssi_ library parameters
|
2014-02-05 21:38:59 -04:00
|
|
|
k_param_flapin_channel,
|
|
|
|
k_param_flaperon_output,
|
2014-03-28 16:52:48 -03:00
|
|
|
k_param_gps,
|
2014-04-13 09:12:27 -03:00
|
|
|
k_param_autotune_level,
|
2014-04-18 16:19:13 -03:00
|
|
|
k_param_rally,
|
2015-01-23 09:45:24 -04:00
|
|
|
k_param_serial0_baud, // deprecated
|
|
|
|
k_param_serial1_baud, // deprecated
|
|
|
|
k_param_serial2_baud, // deprecated
|
2014-05-21 07:21:19 -03:00
|
|
|
k_param_takeoff_tdrag_elevator,
|
|
|
|
k_param_takeoff_tdrag_speed1,
|
|
|
|
k_param_takeoff_rotate_speed,
|
|
|
|
k_param_takeoff_throttle_slewrate,
|
2014-05-24 09:19:50 -03:00
|
|
|
k_param_takeoff_throttle_max,
|
2014-08-26 08:18:24 -03:00
|
|
|
k_param_rangefinder,
|
2014-07-21 19:24:00 -03:00
|
|
|
k_param_terrain,
|
2014-07-24 04:54:58 -03:00
|
|
|
k_param_terrain_follow,
|
2014-08-05 22:46:40 -03:00
|
|
|
k_param_stab_pitch_down_cd_old, // deprecated
|
2015-04-12 23:20:01 -03:00
|
|
|
k_param_glide_slope_min,
|
2014-08-05 22:46:40 -03:00
|
|
|
k_param_stab_pitch_down,
|
2014-08-06 20:31:03 -03:00
|
|
|
k_param_terrain_lookahead,
|
2014-08-23 04:34:07 -03:00
|
|
|
k_param_fbwa_tdrag_chan,
|
2014-08-26 08:18:24 -03:00
|
|
|
k_param_rangefinder_landing,
|
2014-08-29 07:10:44 -03:00
|
|
|
k_param_land_flap_percent,
|
|
|
|
k_param_takeoff_flap_percent,
|
2014-08-29 07:30:41 -03:00
|
|
|
k_param_flap_slewrate,
|
2014-10-17 16:06:53 -03:00
|
|
|
k_param_rtl_autoland,
|
2014-11-06 02:27:26 -04:00
|
|
|
k_param_override_channel,
|
2014-11-12 23:06:00 -04:00
|
|
|
k_param_stall_prevention,
|
2014-11-02 02:26:05 -04:00
|
|
|
k_param_optflow,
|
2015-03-09 00:14:59 -03:00
|
|
|
k_param_cli_enabled,
|
2015-03-06 17:20:55 -04:00
|
|
|
k_param_trim_rc_at_start,
|
2015-03-13 08:33:48 -03:00
|
|
|
k_param_hil_mode,
|
2015-03-11 20:44:10 -03:00
|
|
|
k_param_land_disarm_delay,
|
2015-04-12 23:20:01 -03:00
|
|
|
k_param_glide_slope_threshold,
|
2015-04-15 22:16:30 -03:00
|
|
|
k_param_rudder_only,
|
2015-05-15 01:24:39 -03:00
|
|
|
k_param_gcs3, // 93
|
2015-05-22 19:57:00 -03:00
|
|
|
k_param_gcs_pid_mask,
|
2015-06-03 16:22:24 -03:00
|
|
|
k_param_crash_detection_enable,
|
2015-05-09 13:36:40 -03:00
|
|
|
k_param_land_abort_throttle_enable,
|
2015-08-28 03:01:32 -03:00
|
|
|
k_param_rssi = 97,
|
2015-09-24 07:58:18 -03:00
|
|
|
k_param_rpm_sensor,
|
2015-06-18 07:45:33 -03:00
|
|
|
k_param_parachute,
|
2013-11-27 22:19:34 -04:00
|
|
|
k_param_arming = 100,
|
2015-10-26 20:46:01 -03:00
|
|
|
k_param_parachute_channel,
|
2015-12-30 20:15:57 -04:00
|
|
|
k_param_crash_accel_threshold,
|
2016-01-28 01:37:50 -04:00
|
|
|
k_param_override_safety,
|
2016-02-23 18:46:00 -04:00
|
|
|
k_param_land_throttle_slewrate, // 104
|
2013-11-27 22:19:34 -04:00
|
|
|
|
2013-12-30 18:33:02 -04:00
|
|
|
// 105: Extra parameters
|
|
|
|
k_param_fence_retalt = 105,
|
2014-02-13 18:49:42 -04:00
|
|
|
k_param_fence_autoenable,
|
2014-02-20 13:10:57 -04:00
|
|
|
k_param_fence_ret_rally,
|
2013-12-30 18:33:02 -04:00
|
|
|
|
2012-08-21 23:19:51 -03:00
|
|
|
// 110: Telemetry control
|
|
|
|
//
|
2013-11-22 04:18:19 -04:00
|
|
|
k_param_gcs0 = 110, // stream rates for uartA
|
|
|
|
k_param_gcs1, // stream rates for uartC
|
2012-08-21 23:19:51 -03:00
|
|
|
k_param_sysid_this_mav,
|
|
|
|
k_param_sysid_my_gcs,
|
2014-05-20 23:40:02 -03:00
|
|
|
k_param_serial1_baud_old, // deprecated
|
2012-08-29 19:59:39 -03:00
|
|
|
k_param_telem_delay,
|
2014-05-20 23:40:02 -03:00
|
|
|
k_param_serial0_baud_old, // deprecated
|
2013-11-22 04:18:19 -04:00
|
|
|
k_param_gcs2, // stream rates for uartD
|
2014-05-20 23:40:02 -03:00
|
|
|
k_param_serial2_baud_old, // deprecated
|
2015-01-23 09:45:24 -04:00
|
|
|
k_param_serial2_protocol, // deprecated
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// 120: Fly-by-wire control
|
|
|
|
//
|
2013-07-17 22:58:23 -03:00
|
|
|
k_param_airspeed_min = 120,
|
|
|
|
k_param_airspeed_max,
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_FBWB_min_altitude_cm, // 0=disabled, minimum value for altitude in cm (for first time try 30 meters = 3000 cm)
|
2012-08-17 02:04:53 -03:00
|
|
|
k_param_flybywire_elev_reverse,
|
2012-08-28 00:15:04 -03:00
|
|
|
k_param_alt_control_algorithm,
|
2013-03-27 20:27:25 -03:00
|
|
|
k_param_flybywire_climb_rate,
|
2013-07-10 19:05:25 -03:00
|
|
|
k_param_acro_roll_rate,
|
|
|
|
k_param_acro_pitch_rate,
|
2013-10-04 09:15:53 -03:00
|
|
|
k_param_acro_locking,
|
2016-01-30 03:22:21 -04:00
|
|
|
k_param_use_reverse_thrust = 129,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// 130: Sensor parameters
|
|
|
|
//
|
2012-11-20 03:24:17 -04:00
|
|
|
k_param_imu = 130, // unused
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_altitude_mix,
|
2012-06-27 02:59:52 -03:00
|
|
|
|
2012-08-21 23:19:51 -03:00
|
|
|
k_param_compass_enabled,
|
|
|
|
k_param_compass,
|
2013-09-29 09:54:39 -03:00
|
|
|
k_param_battery_monitoring, // unused
|
|
|
|
k_param_volt_div_ratio, // unused
|
|
|
|
k_param_curr_amp_per_volt, // unused
|
2013-03-07 19:01:33 -04:00
|
|
|
k_param_input_voltage, // deprecated, can be deleted
|
2013-09-29 09:54:39 -03:00
|
|
|
k_param_pack_capacity, // unused
|
2014-08-26 08:18:24 -03:00
|
|
|
k_param_sonar_enabled_old, // unused
|
2012-04-16 07:52:02 -03:00
|
|
|
k_param_ahrs, // AHRS group
|
2012-06-27 02:59:52 -03:00
|
|
|
k_param_barometer, // barometer ground calibration
|
2012-07-15 22:21:50 -03:00
|
|
|
k_param_airspeed, // AP_Airspeed parameters
|
2012-11-20 22:33:23 -04:00
|
|
|
k_param_curr_amp_offset,
|
2014-01-30 18:16:07 -04:00
|
|
|
k_param_NavEKF, // Extended Kalman Filter Inertial Navigation Group
|
2014-03-03 09:47:58 -04:00
|
|
|
k_param_mission, // mission library
|
2015-01-23 09:45:24 -04:00
|
|
|
k_param_serial_manager, // serial manager library
|
2015-09-21 02:28:25 -03:00
|
|
|
k_param_NavEKF2, // EKF2
|
2016-01-30 03:22:21 -04:00
|
|
|
k_param_land_pre_flare_alt,
|
|
|
|
k_param_land_pre_flare_airspeed = 149,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// 150: Navigation parameters
|
|
|
|
//
|
2013-04-11 21:25:46 -03:00
|
|
|
k_param_crosstrack_gain = 150, // unused
|
|
|
|
k_param_crosstrack_entry_angle, // unused
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_roll_limit_cd,
|
|
|
|
k_param_pitch_limit_max_cd,
|
|
|
|
k_param_pitch_limit_min_cd,
|
2012-07-18 21:52:08 -03:00
|
|
|
k_param_airspeed_cruise_cm,
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_RTL_altitude_cm,
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_inverted_flight_ch,
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_min_gndspeed_cm,
|
2013-04-11 21:25:46 -03:00
|
|
|
k_param_crosstrack_use_wind, // unused
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2012-06-13 16:00:20 -03:00
|
|
|
|
|
|
|
//
|
2012-07-02 21:21:01 -03:00
|
|
|
// Camera and mount parameters
|
2012-06-13 16:00:20 -03:00
|
|
|
//
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_camera = 160,
|
2012-07-02 21:21:01 -03:00
|
|
|
k_param_camera_mount,
|
2015-01-08 16:12:08 -04:00
|
|
|
k_param_camera_mount2, // unused
|
2015-11-19 14:24:55 -04:00
|
|
|
k_param_adsb,
|
2015-12-03 16:47:48 -04:00
|
|
|
k_param_notify,
|
2016-01-30 03:22:21 -04:00
|
|
|
k_param_land_pre_flare_sec = 165,
|
2012-06-13 16:00:20 -03:00
|
|
|
|
2012-10-13 08:51:41 -03:00
|
|
|
//
|
2012-10-16 03:21:04 -03:00
|
|
|
// Battery monitoring parameters
|
2012-10-13 08:51:41 -03:00
|
|
|
//
|
2013-09-29 09:54:39 -03:00
|
|
|
k_param_battery = 166,
|
2015-08-28 03:01:32 -03:00
|
|
|
k_param_rssi_pin, // unused, replaced by rssi_ library parameters - 167
|
|
|
|
k_param_battery_volt_pin, // unused - 168
|
|
|
|
k_param_battery_curr_pin, // unused - 169
|
2012-10-13 08:51:41 -03:00
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
//
|
|
|
|
// 170: Radio settings
|
|
|
|
//
|
2013-06-03 03:37:51 -03:00
|
|
|
k_param_rc_1 = 170,
|
|
|
|
k_param_rc_2,
|
|
|
|
k_param_rc_3,
|
|
|
|
k_param_rc_4,
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_rc_5,
|
|
|
|
k_param_rc_6,
|
|
|
|
k_param_rc_7,
|
|
|
|
k_param_rc_8,
|
2012-08-07 03:05:51 -03:00
|
|
|
k_param_rc_9,
|
|
|
|
k_param_rc_10,
|
|
|
|
k_param_rc_11,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
k_param_throttle_min,
|
|
|
|
k_param_throttle_max,
|
|
|
|
k_param_throttle_fs_enabled,
|
|
|
|
k_param_throttle_fs_value,
|
|
|
|
k_param_throttle_cruise,
|
|
|
|
|
|
|
|
k_param_short_fs_action,
|
|
|
|
k_param_long_fs_action,
|
2012-08-21 23:19:51 -03:00
|
|
|
k_param_gcs_heartbeat_fs_enabled,
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_throttle_slewrate,
|
2012-09-22 03:17:38 -03:00
|
|
|
k_param_throttle_suppress_manual,
|
2012-11-26 08:29:00 -04:00
|
|
|
k_param_throttle_passthru_stabilize,
|
2013-04-25 07:10:40 -03:00
|
|
|
k_param_rc_12,
|
2013-05-22 07:33:57 -03:00
|
|
|
k_param_fs_batt_voltage,
|
|
|
|
k_param_fs_batt_mah,
|
2013-07-11 22:56:04 -03:00
|
|
|
k_param_short_fs_timeout,
|
|
|
|
k_param_long_fs_timeout,
|
2014-03-25 00:42:15 -03:00
|
|
|
k_param_rc_13,
|
|
|
|
k_param_rc_14,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// 200: Feed-forward gains
|
|
|
|
//
|
2013-05-30 09:58:31 -03:00
|
|
|
k_param_kff_pitch_compensation = 200, // unused
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_kff_rudder_mix,
|
2013-07-22 00:28:11 -03:00
|
|
|
k_param_kff_pitch_to_throttle, // unused
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_kff_throttle_to_pitch,
|
2012-07-25 22:30:23 -03:00
|
|
|
k_param_scaling_speed,
|
2015-11-24 04:24:04 -04:00
|
|
|
k_param_quadplane,
|
2016-01-19 00:04:30 -04:00
|
|
|
k_param_rtl_radius,
|
2016-02-17 03:17:55 -04:00
|
|
|
k_param_land_then_servos_neutral,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// 210: flight modes
|
|
|
|
//
|
|
|
|
k_param_flight_mode_channel = 210,
|
|
|
|
k_param_flight_mode1,
|
|
|
|
k_param_flight_mode2,
|
|
|
|
k_param_flight_mode3,
|
|
|
|
k_param_flight_mode4,
|
|
|
|
k_param_flight_mode5,
|
|
|
|
k_param_flight_mode6,
|
2015-02-26 17:07:59 -04:00
|
|
|
k_param_initial_mode,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// 220: Waypoint data
|
|
|
|
//
|
|
|
|
k_param_waypoint_mode = 220,
|
2014-03-03 09:47:58 -04:00
|
|
|
k_param_command_total, // unused
|
|
|
|
k_param_command_index, // unused
|
2011-12-26 19:48:26 -04:00
|
|
|
k_param_waypoint_radius,
|
|
|
|
k_param_loiter_radius,
|
2011-12-15 03:08:58 -04:00
|
|
|
k_param_fence_action,
|
|
|
|
k_param_fence_total,
|
|
|
|
k_param_fence_channel,
|
|
|
|
k_param_fence_minalt,
|
|
|
|
k_param_fence_maxalt,
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2012-07-08 22:49:26 -03:00
|
|
|
// other objects
|
2012-06-29 02:10:35 -03:00
|
|
|
k_param_sitl = 230,
|
2012-07-08 22:49:26 -03:00
|
|
|
k_param_obc,
|
2012-08-21 23:34:40 -03:00
|
|
|
k_param_rollController,
|
|
|
|
k_param_pitchController,
|
|
|
|
k_param_yawController,
|
2013-04-11 21:25:46 -03:00
|
|
|
k_param_L1_controller,
|
2013-06-03 02:32:08 -03:00
|
|
|
k_param_rcmap,
|
2013-06-26 05:36:53 -03:00
|
|
|
k_param_TECS_controller,
|
2014-04-18 16:19:13 -03:00
|
|
|
k_param_rally_total_old, //unused
|
2013-10-03 09:01:43 -03:00
|
|
|
k_param_steerController,
|
2012-06-29 02:10:35 -03:00
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
//
|
|
|
|
// 240: PID Controllers
|
2013-04-14 02:42:29 -03:00
|
|
|
k_param_pidNavRoll = 240, // unused
|
2013-05-30 09:58:31 -03:00
|
|
|
k_param_pidServoRoll, // unused
|
|
|
|
k_param_pidServoPitch, // unused
|
2013-07-22 00:28:11 -03:00
|
|
|
k_param_pidNavPitchAirspeed, // unused
|
|
|
|
k_param_pidServoRudder, // unused
|
|
|
|
k_param_pidTeThrottle, // unused
|
|
|
|
k_param_pidNavPitchAltitude, // unused
|
2013-10-03 09:01:43 -03:00
|
|
|
k_param_pidWheelSteer, // unused
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2015-11-09 18:40:34 -04:00
|
|
|
k_param_DataFlash = 253, // Logging Group
|
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
// 254,255: reserved
|
|
|
|
};
|
|
|
|
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int16 format_version;
|
|
|
|
AP_Int8 software_type;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2012-08-21 23:19:51 -03:00
|
|
|
// Telemetry control
|
|
|
|
//
|
|
|
|
AP_Int16 sysid_this_mav;
|
|
|
|
AP_Int16 sysid_my_gcs;
|
2012-08-29 19:59:39 -03:00
|
|
|
AP_Int8 telem_delay;
|
2015-03-09 00:14:59 -03:00
|
|
|
#if CLI_ENABLED == ENABLED
|
|
|
|
AP_Int8 cli_enabled;
|
|
|
|
#endif
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2013-11-23 03:27:20 -04:00
|
|
|
AP_Float hil_err_limit;
|
|
|
|
|
2014-10-17 16:06:53 -03:00
|
|
|
AP_Int8 rtl_autoland;
|
|
|
|
|
2015-03-06 17:20:55 -04:00
|
|
|
AP_Int8 trim_rc_at_start;
|
2015-12-30 20:15:57 -04:00
|
|
|
AP_Int8 crash_accel_threshold;
|
2015-06-03 16:22:24 -03:00
|
|
|
AP_Int8 crash_detection_enable;
|
2015-03-06 17:20:55 -04:00
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
// Feed-forward gains
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Float kff_rudder_mix;
|
|
|
|
AP_Float kff_pitch_to_throttle;
|
|
|
|
AP_Float kff_throttle_to_pitch;
|
2013-10-03 09:01:43 -03:00
|
|
|
AP_Float ground_steer_alt;
|
|
|
|
AP_Int16 ground_steer_dps;
|
2014-08-05 22:46:40 -03:00
|
|
|
AP_Float stab_pitch_down;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2012-07-25 22:30:23 -03:00
|
|
|
// speed used for speed scaling
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Float scaling_speed;
|
2012-07-25 22:30:23 -03:00
|
|
|
|
2013-04-11 21:25:46 -03:00
|
|
|
// navigation controller type. See AP_Navigation::ControllerType
|
|
|
|
AP_Int8 nav_controller;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
2013-06-26 05:36:53 -03:00
|
|
|
// attitude controller type.
|
|
|
|
AP_Int8 att_controller;
|
|
|
|
|
2013-09-13 01:37:48 -03:00
|
|
|
AP_Int8 auto_fbw_steer;
|
2013-07-19 22:33:09 -03:00
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
// Estimation
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Float altitude_mix;
|
2012-08-28 00:15:04 -03:00
|
|
|
AP_Int8 alt_control_algorithm;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Waypoints
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 waypoint_mode;
|
|
|
|
AP_Int16 waypoint_radius;
|
2013-09-13 04:43:00 -03:00
|
|
|
AP_Int16 waypoint_max_radius;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int16 loiter_radius;
|
2016-01-19 00:04:30 -04:00
|
|
|
AP_Int16 rtl_radius;
|
2012-08-07 03:05:51 -03:00
|
|
|
|
2011-12-15 03:09:29 -04:00
|
|
|
#if GEOFENCE_ENABLED == ENABLED
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 fence_action;
|
|
|
|
AP_Int8 fence_total;
|
|
|
|
AP_Int8 fence_channel;
|
|
|
|
AP_Int16 fence_minalt; // meters
|
|
|
|
AP_Int16 fence_maxalt; // meters
|
2013-12-30 18:33:02 -04:00
|
|
|
AP_Int16 fence_retalt; // meters
|
2014-02-13 18:49:42 -04:00
|
|
|
AP_Int8 fence_autoenable;
|
2014-02-20 13:10:57 -04:00
|
|
|
AP_Int8 fence_ret_rally;
|
2011-12-15 03:09:29 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Fly-by-wire
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 flybywire_elev_reverse;
|
2013-03-27 20:27:25 -03:00
|
|
|
AP_Int8 flybywire_climb_rate;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Throttle
|
|
|
|
//
|
2012-09-22 03:17:38 -03:00
|
|
|
AP_Int8 throttle_suppress_manual;
|
2012-11-26 08:29:00 -04:00
|
|
|
AP_Int8 throttle_passthru_stabilize;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 throttle_fs_enabled;
|
|
|
|
AP_Int16 throttle_fs_value;
|
2012-09-09 06:36:35 -03:00
|
|
|
AP_Int8 throttle_nudge;
|
2016-01-30 03:22:21 -04:00
|
|
|
AP_Int16 use_reverse_thrust;
|
2012-08-21 23:19:51 -03:00
|
|
|
|
|
|
|
// Failsafe
|
|
|
|
AP_Int8 short_fs_action;
|
|
|
|
AP_Int8 long_fs_action;
|
2013-07-11 22:56:04 -03:00
|
|
|
AP_Float short_fs_timeout;
|
|
|
|
AP_Float long_fs_timeout;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 gcs_heartbeat_fs_enabled;
|
2013-05-22 07:33:57 -03:00
|
|
|
AP_Float fs_batt_voltage;
|
|
|
|
AP_Float fs_batt_mah;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Flight modes
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 flight_mode_channel;
|
|
|
|
AP_Int8 flight_mode1;
|
|
|
|
AP_Int8 flight_mode2;
|
|
|
|
AP_Int8 flight_mode3;
|
|
|
|
AP_Int8 flight_mode4;
|
|
|
|
AP_Int8 flight_mode5;
|
|
|
|
AP_Int8 flight_mode6;
|
2015-02-26 17:07:59 -04:00
|
|
|
AP_Int8 initial_mode;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Navigational maneuvering limits
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int16 roll_limit_cd;
|
2012-09-19 03:22:53 -03:00
|
|
|
AP_Int16 alt_offset;
|
2013-07-10 19:05:25 -03:00
|
|
|
AP_Int16 acro_roll_rate;
|
|
|
|
AP_Int16 acro_pitch_rate;
|
2013-10-04 09:15:53 -03:00
|
|
|
AP_Int8 acro_locking;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
// Misc
|
|
|
|
//
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 auto_trim;
|
|
|
|
AP_Int8 mix_mode;
|
2013-04-05 01:22:00 -03:00
|
|
|
AP_Int8 vtail_output;
|
2013-04-28 07:49:53 -03:00
|
|
|
AP_Int8 elevon_output;
|
2015-04-15 22:16:30 -03:00
|
|
|
AP_Int8 rudder_only;
|
2013-05-25 05:27:57 -03:00
|
|
|
AP_Float mixing_gain;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 reverse_elevons;
|
|
|
|
AP_Int8 reverse_ch1_elevon;
|
|
|
|
AP_Int8 reverse_ch2_elevon;
|
|
|
|
AP_Int16 num_resets;
|
2014-01-13 21:52:22 -04:00
|
|
|
AP_Int32 log_bitmask;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 reset_switch_chan;
|
|
|
|
AP_Int8 reset_mission_chan;
|
|
|
|
AP_Int32 airspeed_cruise_cm;
|
|
|
|
AP_Int32 RTL_altitude_cm;
|
|
|
|
AP_Float land_flare_alt;
|
2015-03-11 20:44:10 -03:00
|
|
|
AP_Int8 land_disarm_delay;
|
2016-02-17 03:17:55 -04:00
|
|
|
AP_Int8 land_then_servos_neutral;
|
2015-05-09 13:36:40 -03:00
|
|
|
AP_Int8 land_abort_throttle_enable;
|
2016-01-30 03:22:21 -04:00
|
|
|
AP_Float land_pre_flare_alt;
|
|
|
|
AP_Float land_pre_flare_sec;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int32 min_gndspeed_cm;
|
|
|
|
AP_Int16 pitch_trim_cd;
|
|
|
|
AP_Int16 FBWB_min_altitude_cm;
|
2013-03-30 00:38:43 -03:00
|
|
|
AP_Int8 hil_servos;
|
2015-07-13 03:07:40 -03:00
|
|
|
#if HIL_SUPPORT
|
2015-03-13 08:33:48 -03:00
|
|
|
AP_Int8 hil_mode;
|
2015-07-13 03:07:40 -03:00
|
|
|
#endif
|
2012-08-21 23:19:51 -03:00
|
|
|
|
|
|
|
AP_Int8 compass_enabled;
|
|
|
|
AP_Int8 flap_1_percent;
|
|
|
|
AP_Int8 flap_1_speed;
|
|
|
|
AP_Int8 flap_2_percent;
|
|
|
|
AP_Int8 flap_2_speed;
|
2014-08-29 07:10:44 -03:00
|
|
|
AP_Int8 land_flap_percent;
|
2015-08-28 03:01:32 -03:00
|
|
|
AP_Int8 takeoff_flap_percent;
|
2012-08-21 23:19:51 -03:00
|
|
|
AP_Int8 inverted_flight_ch; // 0=disabled, 1-8 is channel for inverted flight trigger
|
|
|
|
AP_Int8 stick_mixing;
|
2013-02-09 07:40:16 -04:00
|
|
|
AP_Float takeoff_throttle_min_speed;
|
2013-03-08 23:41:04 -04:00
|
|
|
AP_Float takeoff_throttle_min_accel;
|
2013-06-26 05:36:53 -03:00
|
|
|
AP_Int8 takeoff_throttle_delay;
|
2014-05-21 07:21:19 -03:00
|
|
|
AP_Int8 takeoff_tdrag_elevator;
|
|
|
|
AP_Float takeoff_tdrag_speed1;
|
|
|
|
AP_Float takeoff_rotate_speed;
|
|
|
|
AP_Int8 takeoff_throttle_slewrate;
|
2016-02-23 18:46:00 -04:00
|
|
|
AP_Int8 land_throttle_slewrate;
|
2013-04-12 07:27:56 -03:00
|
|
|
AP_Int8 level_roll_limit;
|
2014-02-05 21:38:59 -04:00
|
|
|
AP_Int8 flapin_channel;
|
|
|
|
AP_Int8 flaperon_output;
|
2014-07-24 18:58:39 -03:00
|
|
|
#if AP_TERRAIN_AVAILABLE
|
2014-07-24 04:54:58 -03:00
|
|
|
AP_Int8 terrain_follow;
|
2014-08-06 20:31:03 -03:00
|
|
|
AP_Int16 terrain_lookahead;
|
2014-07-24 04:54:58 -03:00
|
|
|
#endif
|
2015-04-12 23:20:01 -03:00
|
|
|
AP_Int16 glide_slope_min;
|
|
|
|
AP_Float glide_slope_threshold;
|
2014-08-23 04:34:07 -03:00
|
|
|
AP_Int8 fbwa_tdrag_chan;
|
2014-08-26 08:18:24 -03:00
|
|
|
AP_Int8 rangefinder_landing;
|
2014-08-29 07:30:41 -03:00
|
|
|
AP_Int8 flap_slewrate;
|
2014-11-06 02:27:26 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
|
|
|
AP_Int8 override_channel;
|
2016-01-28 01:37:50 -04:00
|
|
|
AP_Int8 override_safety;
|
2014-11-06 02:27:26 -04:00
|
|
|
#endif
|
2015-05-27 02:09:19 -03:00
|
|
|
AP_Int16 gcs_pid_mask;
|
2015-10-26 20:46:01 -03:00
|
|
|
AP_Int8 parachute_channel;
|
2012-08-21 23:19:51 -03:00
|
|
|
|
2011-12-26 19:48:26 -04:00
|
|
|
// RC channels
|
2013-06-03 03:37:51 -03:00
|
|
|
RC_Channel rc_1;
|
|
|
|
RC_Channel rc_2;
|
|
|
|
RC_Channel rc_3;
|
|
|
|
RC_Channel rc_4;
|
2012-08-21 23:19:51 -03:00
|
|
|
RC_Channel_aux rc_5;
|
|
|
|
RC_Channel_aux rc_6;
|
|
|
|
RC_Channel_aux rc_7;
|
|
|
|
RC_Channel_aux rc_8;
|
|
|
|
RC_Channel_aux rc_9;
|
|
|
|
RC_Channel_aux rc_10;
|
|
|
|
RC_Channel_aux rc_11;
|
2013-04-25 07:10:40 -03:00
|
|
|
RC_Channel_aux rc_12;
|
2014-03-25 00:42:15 -03:00
|
|
|
RC_Channel_aux rc_13;
|
|
|
|
RC_Channel_aux rc_14;
|
2013-10-03 09:01:43 -03:00
|
|
|
uint8_t _dummy;
|
2011-12-26 19:48:26 -04:00
|
|
|
|
|
|
|
Parameters() :
|
2012-08-21 23:19:51 -03:00
|
|
|
// variable default
|
|
|
|
//----------------------------------------
|
2013-06-03 03:37:51 -03:00
|
|
|
rc_1 (CH_1),
|
|
|
|
rc_2 (CH_2),
|
|
|
|
rc_3 (CH_3),
|
|
|
|
rc_4 (CH_4),
|
2012-08-21 23:19:51 -03:00
|
|
|
rc_5 (CH_5),
|
|
|
|
rc_6 (CH_6),
|
|
|
|
rc_7 (CH_7),
|
|
|
|
rc_8 (CH_8),
|
|
|
|
rc_9 (CH_9),
|
|
|
|
rc_10 (CH_10),
|
|
|
|
rc_11 (CH_11),
|
2013-04-25 07:10:40 -03:00
|
|
|
rc_12 (CH_12),
|
2014-03-25 00:42:15 -03:00
|
|
|
rc_13 (CH_13),
|
|
|
|
rc_14 (CH_14),
|
2013-10-03 09:01:43 -03:00
|
|
|
_dummy(0)
|
2012-08-21 23:34:40 -03:00
|
|
|
{}
|
2011-12-26 19:48:26 -04:00
|
|
|
};
|
|
|
|
|
2012-08-06 22:03:08 -03:00
|
|
|
extern const AP_Param::Info var_info[];
|