2016-02-17 21:25:59 -04:00
|
|
|
#pragma once
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2015-08-11 03:28:40 -03:00
|
|
|
#include <AP_Common/AP_Common.h>
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2018-05-07 23:35:08 -03:00
|
|
|
#include "RC_Channel.h"
|
2022-06-08 01:58:11 -03:00
|
|
|
#include <AC_Avoidance/AC_Avoid.h>
|
2018-06-08 06:22:55 -03:00
|
|
|
#include "AC_Sprayer/AC_Sprayer.h"
|
2022-06-08 01:58:11 -03:00
|
|
|
#include <AP_AIS/AP_AIS.h>
|
|
|
|
#include <AP_Beacon/AP_Beacon.h>
|
|
|
|
#include <AP_Follow/AP_Follow.h>
|
2018-12-27 02:35:13 -04:00
|
|
|
#include "AP_Gripper/AP_Gripper.h"
|
2022-06-08 01:58:11 -03:00
|
|
|
#include <AP_Proximity/AP_Proximity.h>
|
2018-08-29 21:54:12 -03:00
|
|
|
#include "AP_Rally.h"
|
2022-06-08 01:58:11 -03:00
|
|
|
#include <AP_SmartRTL/AP_SmartRTL.h>
|
|
|
|
#include <AP_Stats/AP_Stats.h>
|
2021-07-01 03:15:10 -03:00
|
|
|
#include "AP_Torqeedo/AP_Torqeedo.h"
|
2022-06-08 01:58:11 -03:00
|
|
|
#include <AP_WindVane/AP_WindVane.h>
|
2018-05-07 23:35:08 -03:00
|
|
|
|
2023-01-03 21:39:14 -04:00
|
|
|
#define AP_PARAM_VEHICLE_NAME rover
|
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
// Global parameter class.
|
|
|
|
//
|
|
|
|
class Parameters {
|
|
|
|
public:
|
|
|
|
// The version of the layout as described by the parameter enum.
|
|
|
|
//
|
|
|
|
// When changing the parameter enum in an incompatible fashion, this
|
|
|
|
// value should be incremented by one.
|
|
|
|
//
|
|
|
|
// The increment will prevent old parameters from being used incorrectly
|
|
|
|
// by newer code.
|
|
|
|
//
|
2013-02-28 16:47:26 -04:00
|
|
|
static const uint16_t k_format_version = 16;
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
enum {
|
|
|
|
// Layout version number, always key zero.
|
|
|
|
//
|
|
|
|
k_param_format_version = 0,
|
2018-06-01 22:20:55 -03:00
|
|
|
k_param_software_type, // unused
|
2020-05-31 08:50:19 -03:00
|
|
|
k_param_can_mgr,
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
// Misc
|
|
|
|
//
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_log_bitmask_old = 10, // unused
|
2017-08-15 22:57:05 -03:00
|
|
|
k_param_num_resets_old, // unused
|
2012-04-30 04:17:14 -03:00
|
|
|
k_param_reset_switch_chan,
|
2013-05-02 18:59:15 -03:00
|
|
|
k_param_initial_mode,
|
2013-06-03 21:37:05 -03:00
|
|
|
k_param_scheduler,
|
2013-06-24 23:48:58 -03:00
|
|
|
k_param_relay,
|
2014-01-19 21:57:59 -04:00
|
|
|
k_param_BoardConfig,
|
2019-05-09 08:22:51 -03:00
|
|
|
k_param_pivot_turn_angle_old, // unused
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_rc_13_old, // unused
|
|
|
|
k_param_rc_14_old, // unused
|
2013-02-08 06:17:54 -04:00
|
|
|
|
|
|
|
// IO pins
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_rssi_pin = 20, // unused, replaced by rssi_ library parameters
|
2012-12-18 07:44:12 -04:00
|
|
|
k_param_battery_volt_pin,
|
|
|
|
k_param_battery_curr_pin,
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2022-05-30 06:26:55 -03:00
|
|
|
k_param_precland = 24,
|
|
|
|
|
2014-03-30 18:44:19 -03:00
|
|
|
// braking
|
2017-08-08 21:24:30 -03:00
|
|
|
k_param_braking_percent_old = 30, // unused
|
|
|
|
k_param_braking_speederr_old, // unused
|
2014-03-30 18:44:19 -03:00
|
|
|
|
2014-03-30 18:49:15 -03:00
|
|
|
// misc2
|
|
|
|
k_param_log_bitmask = 40,
|
2014-03-31 16:18:27 -03:00
|
|
|
k_param_gps,
|
2015-01-28 00:56:36 -04:00
|
|
|
k_param_serial0_baud, // deprecated, can be deleted
|
|
|
|
k_param_serial1_baud, // deprecated, can be deleted
|
|
|
|
k_param_serial2_baud, // deprecated, can be deleted
|
2014-03-30 18:49:15 -03:00
|
|
|
|
2015-08-28 03:00:12 -03:00
|
|
|
// 97: RSSI
|
|
|
|
k_param_rssi = 97,
|
2018-12-30 16:43:39 -04:00
|
|
|
k_param_rpm_sensor, // rpm sensor 98
|
|
|
|
|
2015-10-30 02:56:41 -03:00
|
|
|
// 100: Arming parameters
|
|
|
|
k_param_arming = 100,
|
2016-12-20 09:30:32 -04:00
|
|
|
|
2013-01-17 16:56:32 -04:00
|
|
|
// 110: Telemetry control
|
|
|
|
//
|
2023-12-11 12:57:00 -04:00
|
|
|
k_param_gcs0 = 110, // stream rates for SERIAL0
|
|
|
|
k_param_gcs1, // stream rates for SERIAL1
|
2013-01-17 16:56:32 -04:00
|
|
|
k_param_sysid_this_mav,
|
|
|
|
k_param_sysid_my_gcs,
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_serial0_baud_old, // unused
|
|
|
|
k_param_serial1_baud_old, // unused
|
2012-08-29 20:36:18 -03:00
|
|
|
k_param_telem_delay,
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_skip_gyro_cal, // unused
|
2023-12-11 12:57:00 -04:00
|
|
|
k_param_gcs2, // stream rates for SERIAL2
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_serial2_baud_old, // unused
|
2015-01-28 00:56:36 -04:00
|
|
|
k_param_serial2_protocol, // deprecated, can be deleted
|
|
|
|
k_param_serial_manager, // serial manager library
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_cli_enabled_old, // unused
|
2015-05-15 01:24:59 -03:00
|
|
|
k_param_gcs3,
|
2015-06-18 04:37:59 -03:00
|
|
|
k_param_gcs_pid_mask,
|
2020-12-22 15:44:22 -04:00
|
|
|
k_param_gcs4,
|
|
|
|
k_param_gcs5,
|
|
|
|
k_param_gcs6,
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
//
|
|
|
|
// 130: Sensor parameters
|
|
|
|
//
|
2019-03-24 00:25:27 -03:00
|
|
|
k_param_compass_enabled_deprecated = 130,
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_steering_learn, // unused
|
|
|
|
k_param_NavEKF, // deprecated - remove
|
|
|
|
k_param_mission, // mission library
|
|
|
|
k_param_NavEKF2_old, // deprecated - remove
|
2015-09-21 02:27:49 -03:00
|
|
|
k_param_NavEKF2,
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_g2, // 2nd block of parameters
|
2016-11-28 05:49:35 -04:00
|
|
|
k_param_NavEKF3,
|
2013-02-08 06:17:54 -04:00
|
|
|
|
|
|
|
// 140: battery controls
|
2013-10-02 03:07:28 -03:00
|
|
|
k_param_battery_monitoring = 140, // deprecated, can be deleted
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_volt_div_ratio, // deprecated, can be deleted
|
|
|
|
k_param_curr_amp_per_volt, // deprecated, can be deleted
|
|
|
|
k_param_input_voltage, // deprecated, can be deleted
|
|
|
|
k_param_pack_capacity, // deprecated, can be deleted
|
2013-10-02 03:07:28 -03:00
|
|
|
k_param_battery,
|
2013-02-07 18:21:22 -04:00
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//
|
|
|
|
// 150: Navigation parameters
|
|
|
|
//
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_crosstrack_gain = 150, // unused
|
|
|
|
k_param_crosstrack_entry_angle, // unused
|
2013-02-07 18:21:22 -04:00
|
|
|
k_param_speed_cruise,
|
2018-06-05 00:33:13 -03:00
|
|
|
k_param_speed_turn_gain, // unused
|
2017-08-12 01:58:35 -03:00
|
|
|
k_param_speed_turn_dist, // unused
|
2019-01-23 00:48:35 -04:00
|
|
|
k_param_ch7_option, // unused
|
2013-03-21 19:38:25 -03:00
|
|
|
k_param_auto_trigger_pin,
|
|
|
|
k_param_auto_kickstart,
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_turn_circle, // unused
|
2021-05-02 13:37:13 -03:00
|
|
|
k_param_turn_max_g_old, // unused
|
2013-02-07 18:21:22 -04:00
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//
|
|
|
|
// 160: Radio settings
|
|
|
|
//
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_rc_1_old = 160, // unused
|
|
|
|
k_param_rc_2_old, // unused
|
|
|
|
k_param_rc_3_old, // unused
|
|
|
|
k_param_rc_4_old, // unused
|
|
|
|
k_param_rc_5_old, // unused
|
|
|
|
k_param_rc_6_old, // unused
|
|
|
|
k_param_rc_7_old, // unused
|
|
|
|
k_param_rc_8_old, // unused
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-02-08 06:17:54 -04:00
|
|
|
// throttle control
|
2017-08-15 22:32:56 -03:00
|
|
|
k_param_throttle_min_old = 170, // unused
|
|
|
|
k_param_throttle_max_old, // unused
|
2012-04-30 04:17:14 -03:00
|
|
|
k_param_throttle_cruise,
|
2017-08-10 05:33:00 -03:00
|
|
|
k_param_throttle_slewrate_old, // unused
|
|
|
|
k_param_throttle_reduction, // unused
|
2017-11-27 09:11:45 -04:00
|
|
|
k_param_pilot_steer_type,
|
2017-08-10 05:33:00 -03:00
|
|
|
k_param_skid_steer_out_old, // unused
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-02-08 06:17:54 -04:00
|
|
|
// failsafe control
|
|
|
|
k_param_fs_action = 180,
|
|
|
|
k_param_fs_timeout,
|
|
|
|
k_param_fs_throttle_enabled,
|
|
|
|
k_param_fs_throttle_value,
|
|
|
|
k_param_fs_gcs_enabled,
|
2016-11-21 12:08:24 -04:00
|
|
|
k_param_fs_crash_check,
|
2018-11-01 04:04:58 -03:00
|
|
|
k_param_fs_ekf_action,
|
|
|
|
k_param_fs_ekf_thresh, // 187
|
2013-02-08 06:17:54 -04:00
|
|
|
|
|
|
|
// obstacle control
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_sonar_enabled = 190, // deprecated, can be removed
|
|
|
|
k_param_sonar_old, // unused
|
2019-08-03 03:02:17 -03:00
|
|
|
k_param_rangefinder_trigger_cm, // unused
|
|
|
|
k_param_rangefinder_turn_angle, // unused
|
|
|
|
k_param_rangefinder_turn_time, // unused
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_sonar2_old, // unused
|
2019-08-03 03:02:17 -03:00
|
|
|
k_param_rangefinder_debounce, // unused
|
2017-07-13 08:36:44 -03:00
|
|
|
k_param_rangefinder, // rangefinder object
|
2016-12-20 09:30:32 -04:00
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//
|
2013-02-08 06:17:54 -04:00
|
|
|
// 210: driving modes
|
2012-04-30 04:17:14 -03:00
|
|
|
//
|
2013-02-07 18:21:22 -04:00
|
|
|
k_param_mode_channel = 210,
|
|
|
|
k_param_mode1,
|
|
|
|
k_param_mode2,
|
|
|
|
k_param_mode3,
|
|
|
|
k_param_mode4,
|
|
|
|
k_param_mode5,
|
|
|
|
k_param_mode6,
|
2018-05-07 23:35:08 -03:00
|
|
|
k_param_aux_channel_old,
|
2012-04-30 04:17:14 -03:00
|
|
|
|
|
|
|
//
|
|
|
|
// 220: Waypoint data
|
|
|
|
//
|
2014-03-10 05:42:44 -03:00
|
|
|
k_param_command_total = 220, // unused
|
|
|
|
k_param_command_index, // unused
|
2019-05-09 08:22:51 -03:00
|
|
|
k_param_waypoint_radius_old, // unused
|
|
|
|
k_param_waypoint_overshoot_old, // unused
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-07-14 21:25:04 -03:00
|
|
|
//
|
2019-04-20 20:09:49 -03:00
|
|
|
// camera control
|
2013-07-14 21:25:04 -03:00
|
|
|
//
|
|
|
|
k_param_camera,
|
|
|
|
k_param_camera_mount,
|
2015-01-08 16:12:18 -04:00
|
|
|
k_param_camera_mount2, // unused
|
2013-07-14 21:25:04 -03:00
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
//
|
2019-04-20 20:09:49 -03:00
|
|
|
// 230: PID Controllers
|
2013-02-08 06:17:54 -04:00
|
|
|
k_param_pidNavSteer = 230,
|
2016-12-20 09:30:32 -04:00
|
|
|
k_param_pidServoSteer, // unused
|
2017-08-08 21:24:30 -03:00
|
|
|
k_param_pidSpeedThrottle_old, // unused
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-07-14 20:57:00 -03:00
|
|
|
// high RC channels
|
2017-11-27 07:28:49 -04:00
|
|
|
k_param_rc_9_old = 235, // unused
|
|
|
|
k_param_rc_10_old, // unused
|
|
|
|
k_param_rc_11_old, // unused
|
|
|
|
k_param_rc_12_old, // unusedS
|
2013-07-14 20:57:00 -03:00
|
|
|
|
2013-02-08 06:17:54 -04:00
|
|
|
// other objects
|
|
|
|
k_param_sitl = 240,
|
|
|
|
k_param_ahrs,
|
|
|
|
k_param_ins,
|
|
|
|
k_param_compass,
|
2013-06-03 06:33:59 -03:00
|
|
|
k_param_rcmap,
|
2021-11-18 23:38:12 -04:00
|
|
|
k_param_L1_controller, // unused
|
2017-08-08 02:37:21 -03:00
|
|
|
k_param_steerController_old, // unused
|
2014-02-23 18:25:50 -04:00
|
|
|
k_param_barometer,
|
2015-12-03 16:48:16 -04:00
|
|
|
k_param_notify,
|
2016-07-21 22:24:35 -03:00
|
|
|
k_param_button,
|
2018-08-27 16:55:29 -03:00
|
|
|
k_param_osd,
|
2022-09-07 03:49:51 -03:00
|
|
|
k_param_optflow,
|
2013-02-08 06:17:54 -04:00
|
|
|
|
2019-01-18 00:23:42 -04:00
|
|
|
k_param_logger = 253, // Logging Group
|
2015-11-09 18:40:10 -04:00
|
|
|
|
2012-04-30 04:17:14 -03:00
|
|
|
// 254,255: reserved
|
2019-12-01 13:02:18 -04:00
|
|
|
|
|
|
|
k_param_vehicle = 257, // vehicle common block of parameters
|
2012-04-30 04:17:14 -03:00
|
|
|
};
|
|
|
|
|
2013-01-17 16:56:32 -04:00
|
|
|
AP_Int16 format_version;
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-02-08 06:17:54 -04:00
|
|
|
// Misc
|
|
|
|
//
|
2014-03-30 18:49:15 -03:00
|
|
|
AP_Int32 log_bitmask;
|
2016-12-20 09:30:32 -04:00
|
|
|
AP_Int8 reset_switch_chan;
|
2013-05-02 18:59:15 -03:00
|
|
|
AP_Int8 initial_mode;
|
2013-02-08 06:17:54 -04:00
|
|
|
|
2016-12-20 09:30:32 -04:00
|
|
|
// Telemetry control
|
|
|
|
//
|
|
|
|
AP_Int16 sysid_this_mav;
|
|
|
|
AP_Int16 sysid_my_gcs;
|
2013-01-17 16:56:32 -04:00
|
|
|
AP_Int8 telem_delay;
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-02-08 06:17:54 -04:00
|
|
|
// navigation parameters
|
2013-01-17 16:56:32 -04:00
|
|
|
//
|
2013-02-08 06:17:54 -04:00
|
|
|
AP_Float speed_cruise;
|
2016-12-20 09:30:32 -04:00
|
|
|
AP_Int8 ch7_option;
|
2013-03-21 19:38:25 -03:00
|
|
|
AP_Int8 auto_trigger_pin;
|
|
|
|
AP_Float auto_kickstart;
|
2015-06-18 04:37:59 -03:00
|
|
|
AP_Int16 gcs_pid_mask;
|
2013-02-08 06:17:54 -04:00
|
|
|
|
2013-01-17 16:56:32 -04:00
|
|
|
// Throttle
|
|
|
|
//
|
|
|
|
AP_Int8 throttle_cruise;
|
2017-11-27 09:11:45 -04:00
|
|
|
AP_Int8 pilot_steer_type;
|
2013-02-08 06:17:54 -04:00
|
|
|
|
|
|
|
// failsafe control
|
|
|
|
AP_Int8 fs_action;
|
|
|
|
AP_Float fs_timeout;
|
|
|
|
AP_Int8 fs_throttle_enabled;
|
|
|
|
AP_Int16 fs_throttle_value;
|
2016-12-20 09:30:32 -04:00
|
|
|
AP_Int8 fs_gcs_enabled;
|
2016-11-21 12:08:24 -04:00
|
|
|
AP_Int8 fs_crash_check;
|
2018-11-01 04:04:58 -03:00
|
|
|
AP_Int8 fs_ekf_action;
|
|
|
|
AP_Float fs_ekf_thresh;
|
2012-04-30 04:17:14 -03:00
|
|
|
|
2013-02-08 06:17:54 -04:00
|
|
|
// driving modes
|
2013-01-17 16:56:32 -04:00
|
|
|
//
|
2013-02-07 18:21:22 -04:00
|
|
|
AP_Int8 mode_channel;
|
|
|
|
AP_Int8 mode1;
|
|
|
|
AP_Int8 mode2;
|
|
|
|
AP_Int8 mode3;
|
|
|
|
AP_Int8 mode4;
|
|
|
|
AP_Int8 mode5;
|
|
|
|
AP_Int8 mode6;
|
2016-12-20 09:30:32 -04:00
|
|
|
|
2017-08-08 21:24:30 -03:00
|
|
|
Parameters() {}
|
2012-04-30 04:17:14 -03:00
|
|
|
};
|
|
|
|
|
2016-10-25 22:37:08 -03:00
|
|
|
/*
|
|
|
|
2nd block of parameters, to avoid going past 256 top level keys
|
|
|
|
*/
|
|
|
|
class ParametersG2 {
|
|
|
|
public:
|
2017-01-06 06:31:10 -04:00
|
|
|
ParametersG2(void);
|
2016-10-25 22:37:08 -03:00
|
|
|
|
|
|
|
// var_info for holding Parameter information
|
|
|
|
static const struct AP_Param::GroupInfo var_info[];
|
|
|
|
|
2016-11-21 11:06:25 -04:00
|
|
|
// whether to enforce acceptance of packets only from sysid_my_gcs
|
|
|
|
AP_Int8 sysid_enforce;
|
2017-01-06 06:31:10 -04:00
|
|
|
|
|
|
|
// RC input channels
|
2018-05-07 23:35:08 -03:00
|
|
|
RC_Channels_Rover rc_channels;
|
2017-01-31 05:46:32 -04:00
|
|
|
|
2017-01-06 06:31:10 -04:00
|
|
|
// control over servo output ranges
|
|
|
|
SRV_Channels servo_channels;
|
2017-01-30 10:21:55 -04:00
|
|
|
|
|
|
|
#if ADVANCED_FAILSAFE == ENABLED
|
|
|
|
// advanced failsafe library
|
|
|
|
AP_AdvancedFailsafe_Rover afs;
|
|
|
|
#endif
|
2017-08-16 07:57:42 -03:00
|
|
|
|
2023-04-09 05:54:09 -03:00
|
|
|
#if AP_BEACON_ENABLED
|
2017-04-03 17:46:12 -03:00
|
|
|
AP_Beacon beacon;
|
2023-04-09 05:54:09 -03:00
|
|
|
#endif
|
2017-06-01 04:39:49 -03:00
|
|
|
|
2017-07-11 23:02:51 -03:00
|
|
|
// wheel encoders
|
|
|
|
AP_WheelEncoder wheel_encoder;
|
2018-08-08 00:48:30 -03:00
|
|
|
AP_WheelRateControl wheel_rate_control;
|
2017-08-08 02:37:21 -03:00
|
|
|
|
2023-07-30 20:42:25 -03:00
|
|
|
// Motor library
|
|
|
|
AP_MotorsUGV motors;
|
|
|
|
|
2017-08-08 02:37:21 -03:00
|
|
|
// steering and throttle controller
|
|
|
|
AR_AttitudeControl attitude_control;
|
2017-08-10 05:29:21 -03:00
|
|
|
|
|
|
|
// turn radius of vehicle (only used in steering mode)
|
|
|
|
AP_Float turn_radius;
|
2017-11-28 02:59:13 -04:00
|
|
|
|
|
|
|
// acro mode turn rate maximum
|
|
|
|
AP_Float acro_turn_rate;
|
2017-11-29 21:58:11 -04:00
|
|
|
|
|
|
|
// Safe RTL library
|
|
|
|
AP_SmartRTL smart_rtl;
|
2017-12-05 21:41:28 -04:00
|
|
|
|
2019-05-09 08:22:51 -03:00
|
|
|
// default speed for rtl
|
2017-12-05 21:41:28 -04:00
|
|
|
AP_Float rtl_speed;
|
2017-12-06 22:37:42 -04:00
|
|
|
|
|
|
|
// frame class for vehicle
|
|
|
|
AP_Int8 frame_class;
|
2017-08-16 07:02:56 -03:00
|
|
|
|
2021-03-25 05:47:29 -03:00
|
|
|
#if HAL_PROXIMITY_ENABLED
|
2017-08-16 07:57:42 -03:00
|
|
|
// proximity library
|
|
|
|
AP_Proximity proximity;
|
2021-03-25 05:47:29 -03:00
|
|
|
#endif
|
2017-12-12 02:12:16 -04:00
|
|
|
|
2022-07-10 01:02:55 -03:00
|
|
|
#if MODE_DOCK_ENABLED == ENABLED
|
|
|
|
// we need a pointer to the mode for the G2 table
|
|
|
|
class ModeDock *mode_dock_ptr;
|
|
|
|
#endif
|
|
|
|
|
2017-12-12 02:12:16 -04:00
|
|
|
// avoidance library
|
|
|
|
AC_Avoid avoid;
|
2018-05-18 05:38:06 -03:00
|
|
|
|
2018-06-20 08:11:58 -03:00
|
|
|
// pitch angle at 100% throttle
|
|
|
|
AP_Float bal_pitch_max;
|
2018-06-21 09:50:28 -03:00
|
|
|
|
2018-06-27 10:53:30 -03:00
|
|
|
// pitch/roll angle for crash check
|
|
|
|
AP_Int8 crash_angle;
|
2018-05-24 01:47:07 -03:00
|
|
|
|
2023-08-11 09:28:32 -03:00
|
|
|
#if AP_FOLLOW_ENABLED
|
2018-05-24 01:47:07 -03:00
|
|
|
// follow mode library
|
|
|
|
AP_Follow follow;
|
2023-08-11 09:28:32 -03:00
|
|
|
#endif
|
2018-05-31 06:26:07 -03:00
|
|
|
|
|
|
|
// frame type for vehicle (used for vectored motor vehicles and custom motor configs)
|
|
|
|
AP_Int8 frame_type;
|
2018-08-07 01:22:51 -03:00
|
|
|
|
|
|
|
// loiter type
|
|
|
|
AP_Int8 loit_type;
|
2018-09-25 10:09:21 -03:00
|
|
|
AP_Float loit_radius;
|
2018-06-08 06:22:55 -03:00
|
|
|
|
2020-01-17 20:36:11 -04:00
|
|
|
#if HAL_SPRAYER_ENABLED
|
2018-06-08 06:22:55 -03:00
|
|
|
// Sprayer
|
|
|
|
AC_Sprayer sprayer;
|
2020-01-17 20:36:11 -04:00
|
|
|
#endif
|
2018-08-29 21:54:12 -03:00
|
|
|
|
2022-09-20 04:37:48 -03:00
|
|
|
#if AP_GRIPPER_ENABLED
|
2019-02-07 19:45:23 -04:00
|
|
|
AP_Gripper gripper;
|
|
|
|
#endif
|
|
|
|
|
2023-08-18 02:38:03 -03:00
|
|
|
#if HAL_RALLY_ENABLED
|
2018-08-29 21:54:12 -03:00
|
|
|
// Rally point library
|
|
|
|
AP_Rally_Rover rally;
|
2023-08-18 02:38:03 -03:00
|
|
|
#endif
|
2018-07-02 04:21:37 -03:00
|
|
|
|
|
|
|
// Simple mode types
|
|
|
|
AP_Int8 simple_type;
|
2018-09-25 10:09:47 -03:00
|
|
|
|
|
|
|
// windvane
|
|
|
|
AP_WindVane windvane;
|
2018-09-14 04:09:07 -03:00
|
|
|
|
2018-11-08 12:14:45 -04:00
|
|
|
// mission behave
|
|
|
|
AP_Int8 mis_done_behave;
|
2018-12-13 03:49:08 -04:00
|
|
|
|
|
|
|
// balance both pitch trim
|
|
|
|
AP_Float bal_pitch_trim;
|
2019-03-01 02:40:40 -04:00
|
|
|
|
2019-04-20 20:10:51 -03:00
|
|
|
// stick mixing for auto modes
|
|
|
|
AP_Int8 stick_mixing;
|
|
|
|
|
2019-04-29 03:31:45 -03:00
|
|
|
// waypoint navigation
|
2021-11-22 00:38:20 -04:00
|
|
|
AR_WPNav_OA wp_nav;
|
2019-05-07 15:20:43 -03:00
|
|
|
|
|
|
|
// Sailboat functions
|
|
|
|
Sailboat sailboat;
|
2019-05-10 02:59:52 -03:00
|
|
|
|
|
|
|
// object avoidance path planning
|
|
|
|
AP_OAPathPlanner oa;
|
2019-09-18 16:23:28 -03:00
|
|
|
|
|
|
|
// maximum speed for vehicle
|
|
|
|
AP_Float speed_max;
|
|
|
|
|
|
|
|
// gain for speed of correction in loiter
|
|
|
|
AP_Float loiter_speed_gain;
|
2019-09-29 23:32:07 -03:00
|
|
|
|
|
|
|
// FS options
|
|
|
|
AP_Int32 fs_options;
|
2021-07-01 03:15:10 -03:00
|
|
|
|
|
|
|
#if HAL_TORQEEDO_ENABLED
|
|
|
|
// torqeedo motor driver
|
|
|
|
AP_Torqeedo torqeedo;
|
|
|
|
#endif
|
2020-03-28 20:57:37 -03:00
|
|
|
|
2021-11-18 23:38:12 -04:00
|
|
|
// position controller
|
|
|
|
AR_PosControl pos_control;
|
2021-11-19 23:05:23 -04:00
|
|
|
|
|
|
|
// guided options bitmask
|
|
|
|
AP_Int32 guided_options;
|
2022-07-05 15:21:10 -03:00
|
|
|
|
2022-11-09 22:08:18 -04:00
|
|
|
// manual mode options
|
2022-07-05 15:21:10 -03:00
|
|
|
AP_Int32 manual_options;
|
2022-11-09 22:08:18 -04:00
|
|
|
|
|
|
|
// manual mode steering expo
|
|
|
|
AP_Float manual_steering_expo;
|
2023-01-29 18:49:35 -04:00
|
|
|
|
|
|
|
// FS GCS timeout trigger time
|
|
|
|
AP_Float fs_gcs_timeout;
|
2023-04-20 08:53:05 -03:00
|
|
|
|
|
|
|
class ModeCircle mode_circle;
|
2016-10-25 22:37:08 -03:00
|
|
|
};
|
|
|
|
|
2012-08-06 22:24:20 -03:00
|
|
|
extern const AP_Param::Info var_info[];
|