LCOV - code coverage report
Current view: top level - home/pbarker/rc/ardupilot/ArduCopter - Parameters.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 3 100.0 %
Date: 2026-09-09 11:02:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #define AP_PARAM_VEHICLE_NAME copter
       4             : 
       5             : #include <AP_Common/AP_Common.h>
       6             : #include "RC_Channel_Copter.h"
       7             : #include <AP_Proximity/AP_Proximity.h>
       8             : #include <AP_SurfaceDistance/AP_SurfaceDistance.h>
       9             : 
      10             : class ModeRTL;
      11             : 
      12             : #if MODE_FOLLOW_ENABLED
      13             :  # include <AP_Follow/AP_Follow.h>
      14             : #endif
      15             : #if WEATHERVANE_ENABLED
      16             :  #include <AC_AttitudeControl/AC_WeatherVane.h>
      17             : #endif
      18             : #include <AP_GroundEffect/AP_GroundEffect.h>
      19             : 
      20             : // Global parameter class.
      21             : //
      22             : class Parameters {
      23             : public:
      24             :     // The version of the layout as described by the parameter enum.
      25             :     //
      26             :     // When changing the parameter enum in an incompatible fashion, this
      27             :     // value should be incremented by one.
      28             :     //
      29             :     // The increment will prevent old parameters from being used incorrectly
      30             :     // by newer code.
      31             :     //
      32             :     static const uint16_t        k_format_version = 120;
      33             : 
      34             :     // Parameter identities.
      35             :     //
      36             :     // The enumeration defined here is used to ensure that every parameter
      37             :     // or parameter group has a unique ID number.  This number is used by
      38             :     // AP_Param to store and locate parameters in EEPROM.
      39             :     //
      40             :     // Note that entries without a number are assigned the next number after
      41             :     // the entry preceding them. When adding new entries, ensure that they
      42             :     // don't overlap.
      43             :     //
      44             :     // Try to group related variables together, and assign them a set
      45             :     // range in the enumeration. Place these groups in numerical order
      46             :     // at the end of the enumeration.
      47             :     //
      48             :     // WARNING: Care should be taken when editing this enumeration as the
      49             :     //          AP_Param load/save code depends on the values here to identify
      50             :     //          variables saved in EEPROM.
      51             :     //
      52             :     //
      53             :     enum {
      54             :         // Layout version number, always key zero.
      55             :         //
      56             :         k_param_format_version = 0,
      57             :         k_param_software_type, // deprecated
      58             :         k_param_ins_old,                        // *** Deprecated, remove with next eeprom number change
      59             :         k_param_ins,                            // libraries/AP_InertialSensor variables
      60             :         k_param_NavEKF2_old, // deprecated - remove
      61             :         k_param_NavEKF2,
      62             :         k_param_g2, // 2nd block of parameters
      63             :         k_param_NavEKF3,
      64             :         k_param_can_mgr,
      65             :         k_param_osd,
      66             : 
      67             :         // simulation
      68             :         k_param_sitl = 10,
      69             : 
      70             :         // barometer object (needed for SITL)
      71             :         k_param_barometer,
      72             : 
      73             :         // scheduler object (for debugging)
      74             :         k_param_scheduler,
      75             : 
      76             :         // relay object
      77             :         k_param_relay,
      78             : 
      79             :         // (old) EPM object
      80             :         k_param_epm_unused,
      81             : 
      82             :         // BoardConfig object
      83             :         k_param_BoardConfig,
      84             : 
      85             :         // GPS object
      86             :         k_param_gps,
      87             : 
      88             :         // Parachute object
      89             :         k_param_parachute,
      90             : 
      91             :         // Landing gear object
      92             :         k_param_landinggear,    // 18
      93             : 
      94             :         // Input Management object
      95             :         k_param_input_manager,  // 19
      96             : 
      97             :         // Misc
      98             :         //
      99             :         k_param_log_bitmask_old = 20,           // Deprecated
     100             :         k_param_log_last_filenumber,            // *** Deprecated - remove
     101             :                                                 // with next eeprom number
     102             :                                                 // change
     103             :         k_param_toy_yaw_rate,                   // deprecated - remove
     104             :         k_param_crosstrack_min_distance,    // deprecated - remove with next eeprom number change
     105             :         k_param_rssi_pin,                   // unused, replaced by rssi_ library parameters
     106             :         k_param_throttle_accel_enabled,     // deprecated - remove
     107             :         k_param_wp_yaw_behavior,
     108             :         k_param_acro_trainer,
     109             :         k_param_pilot_speed_up_cms,     // deprecated - moved to G2 as PILOT_SPD_UP
     110             :         k_param_circle_rate,            // deprecated - remove
     111             :         k_param_rangefinder_gain,       // deprecated - remove
     112             :         k_param_ch8_option_old,         // deprecated
     113             :         k_param_arming_check_old,       // deprecated - remove
     114             :         k_param_sprayer,
     115             :         k_param_angle_max,              // remove
     116             :         k_param_gps_hdop_good,
     117             :         k_param_battery,
     118             :         k_param_fs_batt_mah,            // unused - moved to AP_BattMonitor
     119             :         k_param_angle_rate_max,         // remove
     120             :         k_param_rssi_range,             // unused, replaced by rssi_ library parameters
     121             :         k_param_rc_feel_rp,             // deprecated
     122             :         k_param_NavEKF,                 // deprecated - remove
     123             :         k_param_mission,                // mission library
     124             :         k_param_rc_13_old,
     125             :         k_param_rc_14_old,
     126             :         k_param_rally,
     127             :         k_param_poshold_brake_rate_degs,
     128             :         k_param_poshold_brake_angle_max,    // deprecated - remove
     129             :         k_param_pilot_accel_d_cmss,     // deprecated - moved to G2 as PILOT_ACC_Z
     130             :         k_param_serial0_baud,           // deprecated - remove
     131             :         k_param_serial1_baud,           // deprecated - remove
     132             :         k_param_serial2_baud,           // deprecated - remove
     133             :         k_param_land_repositioning,
     134             :         k_param_rangefinder, // rangefinder object
     135             :         k_param_fs_ekf_thresh,
     136             :         k_param_terrain,
     137             :         k_param_acro_rp_expo,           // deprecated - remove
     138             :         k_param_throttle_deadzone,
     139             :         k_param_optflow,
     140             :         k_param_dcmcheck_thresh,        // deprecated - remove
     141             :         k_param_log_bitmask,
     142             :         k_param_cli_enabled_old,        // deprecated - remove
     143             :         k_param_throttle_filt,
     144             :         k_param_throttle_behavior,
     145             :         k_param_pilot_takeoff_alt_cm,   // deprecated - moved to G2 as PILOT_TKO_ALT_M
     146             : 
     147             :         // 65: AP_Limits Library
     148             :         k_param_limits = 65,            // deprecated - remove
     149             :         k_param_gpslock_limit,          // deprecated - remove
     150             :         k_param_geofence_limit,         // deprecated - remove
     151             :         k_param_altitude_limit,         // deprecated - remove
     152             :         k_param_fence_old,              // only used for conversion
     153             :         k_param_gps_glitch,             // deprecated
     154             :         k_param_baro_glitch,            // 71 - deprecated
     155             : 
     156             :         // AP_ADSB Library
     157             :         k_param_adsb,                   // 72
     158             :         k_param_notify,                 // 73
     159             : 
     160             :         // 74: precision landing object
     161             :         k_param_precland = 74,
     162             : 
     163             :         //
     164             :         // 75: Singlecopter, CoaxCopter
     165             :         //
     166             :         k_param_single_servo_1 = 75,    // remove
     167             :         k_param_single_servo_2,         // remove
     168             :         k_param_single_servo_3,         // remove
     169             :         k_param_single_servo_4,         // 78 - remove
     170             : 
     171             :         //
     172             :         // 80: Heli
     173             :         //
     174             :         k_param_heli_servo_1 = 80,  // remove
     175             :         k_param_heli_servo_2,       // remove
     176             :         k_param_heli_servo_3,       // remove
     177             :         k_param_heli_servo_4,       // remove
     178             :         k_param_heli_pitch_ff,      // remove
     179             :         k_param_heli_roll_ff,       // remove
     180             :         k_param_heli_yaw_ff,        // remove
     181             :         k_param_heli_stab_col_min,  // remove
     182             :         k_param_heli_stab_col_max,  // remove
     183             :         k_param_heli_servo_rsc,     // 89 = full! - remove
     184             : 
     185             :         //
     186             :         // 90: misc2
     187             :         //
     188             :         k_param_motors = 90,
     189             :         k_param_disarm_delay,
     190             :         k_param_fs_crash_check,
     191             :         k_param_throw_motor_start,
     192             :         k_param_rtl_alt_type,
     193             :         k_param_avoid,
     194             :         k_param_avoidance_adsb,
     195             : 
     196             :         // 97: RSSI
     197             :         k_param_rssi = 97,
     198             :                 
     199             :         //
     200             :         // 100: Inertial Nav
     201             :         //
     202             :         k_param_inertial_nav = 100, // deprecated
     203             :         k_param_wp_nav,
     204             :         k_param_attitude_control,
     205             :         k_param_pos_control,
     206             :         k_param_circle_nav,
     207             :         k_param_loiter_nav,     // 105
     208             :         k_param_custom_control,
     209             : 
     210             :         // 110: Telemetry control
     211             :         //
     212             :         k_param_gcs0_unused = 110,   // unused in ArduPilot-4.7
     213             :         k_param_gcs1_unused,         // unused in ArduPilot-4.7
     214             :         k_param_sysid_this_mav_old,
     215             :         k_param_sysid_my_gcs_old,
     216             :         k_param_serial1_baud_old, // deprecated
     217             :         k_param_telem_delay_old,     // used for conversion in ArduPilot-4.7
     218             :         k_param_gcs2_unused,         // unused in ArduPilot-4.7
     219             :         k_param_serial2_baud_old, // deprecated
     220             :         k_param_serial2_protocol, // deprecated
     221             :         k_param_serial_manager_old,
     222             :         k_param_ch9_option_old,
     223             :         k_param_ch10_option_old,
     224             :         k_param_ch11_option_old,
     225             :         k_param_ch12_option_old,
     226             :         k_param_takeoff_trigger_dz_old,
     227             :         k_param_gcs3_unused,         // unused in ArduPilot-4.7
     228             :         k_param_gcs_pid_mask,    // 126
     229             :         k_param_gcs4_unused,         // unused in ArduPilot-4.7
     230             :         k_param_gcs5_unused,         // unused in ArduPilot-4.7
     231             :         k_param_gcs6_unused,         // unused in ArduPilot-4.7
     232             : 
     233             :         //
     234             :         // 135 : reserved for Solo until features merged with master
     235             :         //
     236             :         k_param_rtl_speed_cms = 135,    // remove
     237             :         k_param_fs_batt_curr_rtl,
     238             :         k_param_rtl_cone_slope, // 137
     239             : 
     240             :         //
     241             :         // 140: Sensor parameters
     242             :         //
     243             :         k_param_imu = 140, // deprecated - can be deleted
     244             :         k_param_battery_monitoring = 141,   // deprecated - can be deleted
     245             :         k_param_volt_div_ratio, // deprecated - can be deleted
     246             :         k_param_curr_amp_per_volt,  // deprecated - can be deleted
     247             :         k_param_input_voltage,  // deprecated - can be deleted
     248             :         k_param_pack_capacity,  // deprecated - can be deleted
     249             :         k_param_compass_enabled_deprecated,
     250             :         k_param_compass,
     251             :         k_param_rangefinder_enabled_old, // deprecated
     252             :         k_param_frame_type,
     253             :         k_param_optflow_enabled,    // deprecated
     254             :         k_param_fs_batt_voltage,    // unused - moved to AP_BattMonitor
     255             :         k_param_ch7_option_old,
     256             :         k_param_auto_slew_rate,     // deprecated - can be deleted
     257             :         k_param_rangefinder_type_old,     // deprecated
     258             :         k_param_super_simple = 155,
     259             :         k_param_axis_enabled = 157, // deprecated - remove with next eeprom number change
     260             :         k_param_copter_leds_mode,   // deprecated - remove with next eeprom number change
     261             :         k_param_ahrs, // AHRS group // 159
     262             : 
     263             :         //
     264             :         // 160: Navigation parameters
     265             :         //
     266             :         k_param_rtl_altitude_cm = 160,  // remove
     267             :         k_param_crosstrack_gain,    // deprecated - remove with next eeprom number change
     268             :         k_param_rtl_loiter_time,
     269             :         k_param_rtl_alt_final_cm,   // remove
     270             :         k_param_tilt_comp, // 164 deprecated - remove with next eeprom number change
     271             : 
     272             : 
     273             :         //
     274             :         // Camera and mount parameters
     275             :         //
     276             :         k_param_camera = 165,
     277             :         k_param_camera_mount,
     278             :         k_param_camera_mount2,      // deprecated
     279             : 
     280             :         //
     281             :         // Battery monitoring parameters
     282             :         //
     283             :         k_param_battery_volt_pin = 168, // deprecated - can be deleted
     284             :         k_param_battery_curr_pin,   // 169 deprecated - can be deleted
     285             : 
     286             :         //
     287             :         // 170: Radio settings
     288             :         //
     289             :         k_param_rc_1_old = 170,
     290             :         k_param_rc_2_old,
     291             :         k_param_rc_3_old,
     292             :         k_param_rc_4_old,
     293             :         k_param_rc_5_old,
     294             :         k_param_rc_6_old,
     295             :         k_param_rc_7_old,
     296             :         k_param_rc_8_old,
     297             :         k_param_rc_10_old,
     298             :         k_param_rc_11_old,
     299             :         k_param_throttle_min,           // remove
     300             :         k_param_throttle_max,           // remove
     301             :         k_param_failsafe_throttle,
     302             :         k_param_throttle_fs_action,     // remove
     303             :         k_param_failsafe_throttle_value,
     304             :         k_param_throttle_trim,          // remove
     305             :         k_param_esc_calibrate,
     306             :         k_param_rc_tuning_param,
     307             :         k_param_rc_tuning_param_high_old,   // unused
     308             :         k_param_rc_tuning_param_low_old,    // unused
     309             :         k_param_rc_speed = 192,
     310             :         k_param_failsafe_battery_enabled, // unused - moved to AP_BattMonitor
     311             :         k_param_throttle_mid,           // remove
     312             :         k_param_failsafe_gps_enabled,   // remove
     313             :         k_param_rc_9_old,
     314             :         k_param_rc_12_old,
     315             :         k_param_failsafe_gcs,
     316             :         k_param_rcmap, // 199
     317             : 
     318             :         //
     319             :         // 200: flight modes
     320             :         //
     321             :         k_param_flight_modes0 = 200,
     322             :         k_param_flight_modes1,
     323             :         k_param_flight_modes2,
     324             :         k_param_flight_modes3,
     325             :         k_param_flight_modes4,
     326             :         k_param_flight_modes5,
     327             :         k_param_simple_modes,
     328             :         k_param_flight_mode_chan,
     329             :         k_param_initial_mode,
     330             : 
     331             :         //
     332             :         // 210: Waypoint data
     333             :         //
     334             :         k_param_waypoint_mode = 210, // remove
     335             :         k_param_command_total,       // remove
     336             :         k_param_command_index,       // remove
     337             :         k_param_command_nav_index,   // remove
     338             :         k_param_waypoint_radius,     // remove
     339             :         k_param_circle_radius,       // remove
     340             :         k_param_waypoint_speed_max,  // remove
     341             :         k_param_land_speed_cms,      // remove
     342             :         k_param_auto_velocity_z_min, // remove
     343             :         k_param_auto_velocity_z_max, // remove - 219
     344             :         k_param_land_speed_high_cms, // remove
     345             : 
     346             :         //
     347             :         // 220: PI/D Controllers
     348             :         //
     349             :         k_param_acro_rp_p = 221,    // remove
     350             :         k_param_axis_lock_p,        // remove
     351             :         k_param_pid_rate_roll,      // remove
     352             :         k_param_pid_rate_pitch,     // remove
     353             :         k_param_pid_rate_yaw,       // remove
     354             :         k_param_p_stabilize_roll,   // remove
     355             :         k_param_p_stabilize_pitch,  // remove
     356             :         k_param_p_stabilize_yaw,    // remove
     357             :         k_param_p_pos_xy,           // remove
     358             :         k_param_p_loiter_lon,       // remove
     359             :         k_param_pid_loiter_rate_lat,    // remove
     360             :         k_param_pid_loiter_rate_lon,    // remove
     361             :         k_param_pid_nav_lat,        // remove
     362             :         k_param_pid_nav_lon,        // remove
     363             :         k_param_p_alt_hold,             // remove
     364             :         k_param_p_vel_z,                // remove
     365             :         k_param_pid_optflow_roll,       // remove
     366             :         k_param_pid_optflow_pitch,      // remove
     367             :         k_param_acro_balance_roll_old,  // remove
     368             :         k_param_acro_balance_pitch_old, // remove
     369             :         k_param_pid_accel_z,            // remove
     370             :         k_param_acro_balance_roll,
     371             :         k_param_acro_balance_pitch,
     372             :         k_param_acro_yaw_p,             // remove
     373             :         k_param_autotune_axis_bitmask, // remove
     374             :         k_param_autotune_aggressiveness, // remove
     375             :         k_param_pi_vel_xy,              // remove
     376             :         k_param_fs_ekf_action,
     377             :         k_param_rtl_climb_min_cm,   // remove
     378             :         k_param_rpm_sensor_old, // remove
     379             :         k_param_autotune_min_d, // remove
     380             :         k_param_arming, // 252  - AP_Arming
     381             :         k_param_logger = 253, // 253 - Logging Group
     382             : 
     383             :         // 254,255: reserved
     384             : 
     385             :         k_param_vehicle = 257, // vehicle common block of parameters
     386             :         k_param_throw_altitude_min,
     387             :         k_param_throw_altitude_max,
     388             :         k_param__gcs,
     389             :         k_param_throw_altitude_descend,
     390             :         k_param_throw_altitude_ascend,
     391             : 
     392             :         // the k_param_* space is 9-bits in size
     393             :         // 511: reserved
     394             :     };
     395             : 
     396             :     AP_Int16        format_version;
     397             : 
     398             :     AP_Float        throttle_filt;
     399             :     AP_Int16        throttle_behavior;
     400             : 
     401             : #if MODE_RTL_ENABLED
     402             :     AP_Float        rtl_cone_slope;
     403             :     AP_Int32        rtl_loiter_time;
     404             :     AP_Enum<ModeRTL::RTLAltType> rtl_alt_type;
     405             : #endif
     406             : 
     407             :     // GCS failsafe definitions (FS_GCS_ENABLE parameter)
     408             :     enum class FS_GCS_Action {
     409             :         DISABLED                 = 0,
     410             :         ALWAYS_RTL               = 1,
     411             :         CONTINUE_MISSION         = 2,    // Removed in 4.0+, now use fs_options
     412             :         ALWAYS_SMARTRTL_OR_RTL   = 3,
     413             :         ALWAYS_SMARTRTL_OR_LAND  = 4,
     414             :         ALWAYS_LAND              = 5,
     415             :         AUTO_RTL_OR_RTL          = 6,
     416             :         BRAKE_OR_LAND            = 7,
     417             :     };
     418             : 
     419             :     AP_Enum<FS_GCS_Action> failsafe_gcs;        // ground station failsafe behavior
     420             :     AP_Int16        gps_hdop_good;              // GPS Hdop value at or below this value represent a good position
     421             : 
     422             :     AP_Int8         super_simple;
     423             : 
     424             :     // Yaw behaviours during missions (WP_YAW_BEHAVIOR parameter)
     425             :     enum class WPYawBehavior {
     426             :         NONE                       = 0,
     427             :         LOOK_AT_NEXT_WP            = 1,
     428             :         LOOK_AT_NEXT_WP_EXCEPT_RTL = 2,
     429             :         LOOK_AHEAD                 = 3,
     430             :     };
     431             : 
     432             :     AP_Enum<WPYawBehavior> wp_yaw_behavior;     // controls how the autopilot controls yaw during missions
     433             : 
     434             : #if MODE_POSHOLD_ENABLED
     435             :     AP_Int16        poshold_brake_rate_degs;    // PosHold flight mode's rotation rate during braking in deg/sec
     436             : #endif
     437             : 
     438             :     // Throttle failsafe definitions (FS_THR_ENABLE parameter)
     439             :     enum class FS_THR_Action {
     440             :         DISABLED                 = 0,
     441             :         ALWAYS_RTL               = 1,
     442             :         CONTINUE_MISSION         = 2,    // Removed in 4.0+, now use fs_options
     443             :         ALWAYS_LAND              = 3,
     444             :         ALWAYS_SMARTRTL_OR_RTL   = 4,
     445             :         ALWAYS_SMARTRTL_OR_LAND  = 5,
     446             :         AUTO_RTL_OR_RTL          = 6,
     447             :         BRAKE_OR_LAND            = 7,
     448             :     };
     449             : 
     450             :     // Throttle
     451             :     //
     452             :     AP_Enum<FS_THR_Action> failsafe_throttle;
     453             :     AP_Int16        failsafe_throttle_value;
     454             :     AP_Int16        throttle_deadzone;
     455             : 
     456             :     // Flight modes
     457             :     //
     458             :     AP_Int8         flight_modes[6];
     459             :     AP_Int8         simple_modes;
     460             :     AP_Int8         flight_mode_chan;
     461             :     AP_Int8         initial_mode;
     462             : 
     463             :     // Misc
     464             :     //
     465             :     AP_Int32        log_bitmask;
     466             :     AP_Int8         esc_calibrate;
     467             : #if AP_RC_TRANSMITTER_TUNING_ENABLED
     468             :     AP_Int8         rc_tuning_param;
     469             : #endif  // AP_RC_TRANSMITTER_TUNING_ENABLED
     470             :     AP_Int8         frame_type;
     471             :     AP_Int8         disarm_delay;
     472             : 
     473             :     AP_Int8         land_repositioning;
     474             : 
     475             :     // EKF failsafe definitions (FS_EKF_ACTION parameter)
     476             :     enum class FS_EKF_Action {
     477             :         REPORT_ONLY          = 0,
     478             :         LAND                 = 1,
     479             :         ALTHOLD              = 2,
     480             :         LAND_EVEN_STABILIZE  = 3,
     481             :     };
     482             : 
     483             :     AP_Enum<FS_EKF_Action> fs_ekf_action;
     484             :     AP_Int8         fs_crash_check;
     485             :     AP_Float        fs_ekf_thresh;
     486             :     AP_Int16        gcs_pid_mask;
     487             : 
     488             : #if MODE_THROW_ENABLED
     489             :     AP_Enum<ModeThrow::PreThrowMotorState>         throw_motor_start;
     490             :     AP_Int16         throw_altitude_min; // minimum altitude in m above which a throw can be detected
     491             :     AP_Int16         throw_altitude_max; // maximum altitude in m below which a throw can be detected
     492             : 
     493             :     AP_Float         throw_altitude_descend;    // target altitude (meters) to descend during a drop, (must be positive)
     494             :     AP_Float         throw_altitude_ascend;     // target altitude (meters) to ascend during a throw upwards, (must be positive)
     495             : #endif
     496             : 
     497             :     AP_Int16                rc_speed; // speed of fast RC Channels in Hz
     498             : 
     499             : #if MODE_ACRO_ENABLED || MODE_SPORT_ENABLED
     500             :     // Acro parameters
     501             :     AP_Float                acro_balance_roll;
     502             :     AP_Float                acro_balance_pitch;
     503             : #endif
     504             : 
     505             : #if MODE_ACRO_ENABLED
     506             :     // Acro parameters
     507             :     AP_Int8                 acro_trainer;
     508             : #endif
     509             : 
     510             :     // Note: keep initializers here in the same order as they are declared
     511             :     // above.
     512        1001 :     Parameters()
     513        7007 :     {
     514        1001 :     }
     515             : };
     516             : 
     517             : /*
     518             :   2nd block of parameters, to avoid going past 256 top level keys
     519             :  */
     520             : class ParametersG2 {
     521             : public:
     522             :     ParametersG2(void);
     523             : 
     524             :     // var_info for holding Parameter information
     525             :     static const struct AP_Param::GroupInfo var_info[];
     526             :     static const struct AP_Param::GroupInfo var_info2[];
     527             : 
     528             :     // altitude at which nav control can start in takeoff
     529             :     AP_Float wp_navalt_min_m;
     530             : 
     531             :     // unused_integer simply exists so that the constructor for
     532             :     // ParametersG2 can be created with a relatively easy syntax in
     533             :     // the face of many #ifs:
     534             :     uint8_t unused_integer;
     535             : 
     536             :     // button checking
     537             : #if HAL_BUTTON_ENABLED
     538             :     AP_Button *button_ptr;
     539             : #endif
     540             : 
     541             : #if MODE_THROW_ENABLED
     542             :     // Throw mode parameters
     543             :     AP_Int8 throw_nextmode;
     544             :     AP_Enum<ModeThrow::ThrowType> throw_type;
     545             : #endif
     546             : 
     547             : #if AP_GROUNDEFFECT_ENABLED
     548             :     // ground effect detector
     549             :     AP_GroundEffect ground_effect;
     550             : #endif
     551             : 
     552             : #if AP_TEMPCALIBRATION_ENABLED
     553             :     // temperature calibration handling
     554             :     AP_TempCalibration temp_calibration;
     555             : #endif
     556             : 
     557             : #if HAL_PROXIMITY_ENABLED
     558             :     // proximity (aka object avoidance) library
     559             :     AP_Proximity proximity;
     560             : #endif
     561             : 
     562             : #if AP_COPTER_ADVANCED_FAILSAFE_ENABLED
     563             :     // advanced failsafe library
     564             :     AP_AdvancedFailsafe_Copter afs;
     565             : #endif
     566             : 
     567             :     // developer options
     568             :     AP_Int32 dev_options;
     569             : 
     570             : #if MODE_ACRO_ENABLED
     571             :     AP_Float acro_thr_mid;
     572             : #endif
     573             : 
     574             :     // frame class
     575             :     AP_Int8 frame_class;
     576             : 
     577             :     // RC input channels
     578             :     RC_Channels_Copter rc_channels;
     579             :     
     580             :     // control over servo output ranges
     581             :     SRV_Channels servo_channels;
     582             : 
     583             : #if MODE_SMARTRTL_ENABLED
     584             :     // Safe RTL library
     585             :     AP_SmartRTL smart_rtl;
     586             : #endif
     587             : 
     588             :     // wheel encoder and winch
     589             : #if AP_WINCH_ENABLED
     590             :     AP_Winch winch;
     591             : #endif
     592             : 
     593             :     // Pilot vertical velocity and acceleration
     594             :     AP_Float    pilot_accel_d_mss;      // vertical acceleration the pilot may request
     595             :     AP_Float    pilot_speed_up_ms;      // maximum vertical ascending velocity the pilot may request
     596             :     AP_Float    pilot_speed_dn_ms;      // maximum vertical descending velocity the pilot may request
     597             :     AP_Float    pilot_takeoff_alt_m;    // altitude vehicle will takeoff to after pilot triggers takeoff with throttle stick
     598             : 
     599             : #if TOY_MODE_ENABLED
     600             :     ToyMode toy_mode;
     601             : #endif
     602             : 
     603             : #if MODE_FLOWHOLD_ENABLED
     604             :     // we need a pointer to the mode for the G2 table
     605             :     void *mode_flowhold_ptr;
     606             : #endif
     607             : 
     608             : #if MODE_FOLLOW_ENABLED
     609             :     // follow
     610             :     AP_Follow follow;
     611             : #endif
     612             : 
     613             : #if USER_PARAMS_ENABLED
     614             :     // User custom parameters
     615             :     UserParameters user_parameters;
     616             : #endif
     617             : 
     618             : #if AUTOTUNE_ENABLED
     619             :     // we need a pointer to autotune for the G2 table
     620             :     void *autotune_ptr;
     621             : #endif
     622             : 
     623             : #if AP_RC_TRANSMITTER_TUNING_ENABLED
     624             :     AP_Float rc_tuning_min;
     625             :     AP_Float rc_tuning_max;
     626             : #endif  // AP_RC_TRANSMITTER_TUNING_ENABLED
     627             : 
     628             : #if AP_OAPATHPLANNER_ENABLED
     629             :     // object avoidance path planning
     630             :     AP_OAPathPlanner oa;
     631             : #endif
     632             : 
     633             : #if MODE_SYSTEMID_ENABLED
     634             :     // we need a pointer to the mode for the G2 table
     635             :     void *mode_systemid_ptr;
     636             : #endif
     637             : 
     638             :     // vibration failsafe enable/disable
     639             :     AP_Int8 fs_vibe_enabled;
     640             : 
     641             :     // Failsafe options bitmask #36
     642             :     AP_Int32 fs_options;
     643             : 
     644             : #if MODE_AUTOROTATE_ENABLED
     645             :     // Autonmous autorotation
     646             :     AC_Autorotation arot;
     647             : #endif
     648             : 
     649             : #if MODE_ZIGZAG_ENABLED
     650             :     // we need a pointer to the mode for the G2 table
     651             :     void *mode_zigzag_ptr;
     652             : #endif
     653             : 
     654             :     // command model parameters
     655             : #if MODE_ACRO_ENABLED || MODE_SPORT_ENABLED
     656             :     AC_CommandModel command_model_acro_rp;
     657             : #endif
     658             : 
     659             : #if MODE_ACRO_ENABLED || MODE_DRIFT_ENABLED
     660             :     AC_CommandModel command_model_acro_y;
     661             : #endif
     662             : 
     663             :     AC_CommandModel command_model_pilot_y;
     664             : 
     665             : #if MODE_ACRO_ENABLED
     666             :     AP_Int8 acro_options;
     667             : #endif
     668             : 
     669             : #if MODE_AUTO_ENABLED
     670             :     AP_Int32 auto_options;
     671             : #endif
     672             : 
     673             : #if MODE_GUIDED_ENABLED
     674             :     AP_Int32 guided_options;
     675             : #endif
     676             : 
     677             :     AP_Float fs_gcs_timeout;
     678             : 
     679             : #if MODE_RTL_ENABLED
     680             :     AP_Int32 rtl_options;
     681             : #endif
     682             : 
     683             :     AP_Int32 flight_options;
     684             : 
     685             : #if AP_RANGEFINDER_ENABLED
     686             :     AP_Float rangefinder_filt;
     687             : #endif
     688             : 
     689             : #if MODE_GUIDED_ENABLED
     690             :     AP_Float guided_timeout;
     691             : #endif
     692             : 
     693             :     AP_Int8                 surftrak_mode;
     694             :     AP_Int8                 failsafe_dr_enable;
     695             :     AP_Int16                failsafe_dr_timeout;
     696             :     AP_Float                surftrak_tc;
     697             :     AP_SurfaceDistance::SurfDistParameters surf_dist_parameters;
     698             : 
     699             :     // ramp time of throttle during take-off
     700             :     AP_Float takeoff_throttle_slew_time;
     701             :     AP_Float takeoff_throttle_max;
     702             : #if HAL_WITH_ESC_TELEM && FRAME_CONFIG != HELI_FRAME
     703             :     AP_Int16 takeoff_rpm_min;
     704             :     AP_Int16 takeoff_rpm_max;
     705             : #endif
     706             : 
     707             :     // EKF variance filter cutoff
     708             :     AP_Float fs_ekf_filt_hz;
     709             : 
     710             : #if WEATHERVANE_ENABLED
     711             :     AC_WeatherVane weathervane;
     712             : #endif
     713             : 
     714             : #if AC_PAYLOAD_PLACE_ENABLED
     715             :     // payload place parameters
     716             :     AP_Float pldp_thrust_placed_fraction;
     717             :     AP_Float pldp_range_finder_maximum_m;
     718             :     AP_Float pldp_delay_s;
     719             :     AP_Float pldp_descent_speed_ms;
     720             : #endif  // AC_PAYLOAD_PLACE_ENABLED
     721             : 
     722             :     AP_Int8 att_enable;
     723             :     AP_Int8 att_decimation;
     724             : 
     725             : #if AP_RC_TRANSMITTER_TUNING_ENABLED
     726             :     // second transmitter channel for tuning:
     727             :     AP_Int8 rc_tuning2_param;
     728             :     AP_Float rc_tuning2_min;
     729             :     AP_Float rc_tuning2_max;
     730             : #endif  // AP_RC_TRANSMITTER_TUNING_ENABLED
     731             : 
     732             : #if MODE_RTL_ENABLED
     733             :     void *mode_rtl_ptr;
     734             : #endif
     735             : 
     736             :     void *mode_land_ptr;
     737             : 
     738             : #if MODE_POSHOLD_ENABLED
     739             :     void *mode_poshold_ptr;
     740             : #endif
     741             : 
     742             : #if MODE_FLIP_ENABLED
     743             :     void *mode_flip_ptr;
     744             : #endif
     745             : 
     746             : };
     747             : 
     748             : extern const AP_Param::Info        var_info[];

Generated by: LCOV version 1.14