Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/AntennaTracker/Parameters.h
Views: 1798
#pragma once12#define AP_PARAM_VEHICLE_NAME tracker34#include <AC_PID/AC_PID.h>5#include <AP_Param/AP_Param.h>67// Global parameter class.8//9class Parameters {10public:1112/*13* The value of k_format_version determines whether the existing14* eeprom data is considered valid. You should only change this15* value under the following circumstances:16*17* 1) the meaning of an existing eeprom parameter changes18*19* 2) the value of an existing k_param_* enum value changes20*21* Adding a new parameter should _not_ require a change to22* k_format_version except under special circumstances. If you23* change it anyway then all ArduPlane users will need to reload all24* their parameters. We want that to be an extremely rare25* thing. Please do not just change it "just in case".26*27* To determine if a k_param_* value has changed, use the rules of28* C++ enums to work out the value of the neighboring enum29* values. If you don't know the C++ enum rules then please ask for30* help.31*/3233//////////////////////////////////////////////////////////////////34// STOP!!! DO NOT CHANGE THIS VALUE UNTIL YOU FULLY UNDERSTAND THE35// COMMENTS ABOVE. IF UNSURE, ASK ANOTHER DEVELOPER!!!36static const uint16_t k_format_version = 1;37//////////////////////////////////////////////////////////////////383940enum {41// Layout version number, always key zero.42//43k_param_format_version = 0,44k_param_software_type, // deprecated4546k_param_gcs0 = 100, // stream rates for SERIAL047k_param_gcs1, // stream rates for SERIAL148k_param_sysid_this_mav,49k_param_sysid_my_gcs,50k_param_serial0_baud, // deprecated51k_param_serial1_baud, // deprecated52k_param_imu,53k_param_compass_enabled_deprecated,54k_param_compass,55k_param_ahrs, // AHRS group56k_param_barometer,57k_param_scheduler,58k_param_ins,59k_param_sitl,60k_param_pidPitch_old, // deprecated61k_param_pidYaw_old, // deprecated62k_param_gcs2, // stream rates for SERIAL263k_param_serial2_baud, // deprecated6465k_param_yaw_slew_time,66k_param_pitch_slew_time,67k_param_min_reverse_time,6869k_param_start_latitude,70k_param_start_longitude,71k_param_startup_delay,72k_param_BoardConfig,73k_param_gps,74k_param_scan_speed_unused, // deprecated75k_param_proxy_mode_unused, // deprecated76k_param_servo_pitch_type,77k_param_onoff_yaw_rate,78k_param_onoff_pitch_rate,79k_param_onoff_yaw_mintime,80k_param_onoff_pitch_mintime,81k_param_yaw_trim,82k_param_pitch_trim,83k_param_yaw_range,84k_param_pitch_range, //deprecated85k_param_distance_min,86k_param_sysid_target, // 13887k_param_gcs3, // stream rates for fourth MAVLink port88k_param_log_bitmask, // 14089k_param_notify,90k_param_can_mgr,91k_param_battery,9293k_param_serial_manager_old = 144, // serial manager library94k_param_servo_yaw_type,95k_param_alt_source,96k_param_mavlink_update_rate,97k_param_pitch_min,98k_param_pitch_max,99k_param_gcs4,100k_param_gcs5,101k_param_gcs6,102103//104// 200 : Radio settings105//106k_param_channel_yaw_old = 200,107k_param_channel_pitch_old,108k_param_pidPitch2Srv,109k_param_pidYaw2Srv,110k_param_rc_channels,111k_param_servo_channels,112113k_param_stats_old = 218,114k_param_scripting_old = 219,115116//117// 220: Waypoint data118//119k_param_command_total = 220,120121// 254,255: reserved122k_param_gcs_pid_mask = 225,123k_param_scan_speed_yaw,124k_param_scan_speed_pitch,125k_param_initial_mode,126k_param_disarm_pwm,127128k_param_auto_opts,129k_param_NavEKF2,130k_param_NavEKF3,131132k_param_logger = 253, // 253 - Logging Group133134k_param_vehicle = 257, // vehicle common block of parameters135};136137AP_Int16 format_version;138139// Telemetry control140//141AP_Int16 sysid_this_mav;142AP_Int16 sysid_my_gcs;143AP_Int16 sysid_target;144145AP_Float yaw_slew_time;146AP_Float pitch_slew_time;147AP_Float min_reverse_time;148AP_Int16 scan_speed_yaw;149AP_Int16 scan_speed_pitch;150151AP_Float start_latitude;152AP_Float start_longitude;153154AP_Float startup_delay;155AP_Int8 servo_pitch_type;156AP_Int8 servo_yaw_type;157AP_Int8 alt_source;158AP_Int8 mavlink_update_rate;159AP_Float onoff_yaw_rate;160AP_Float onoff_pitch_rate;161AP_Float onoff_yaw_mintime;162AP_Float onoff_pitch_mintime;163AP_Float yaw_trim;164AP_Float pitch_trim;165AP_Int16 yaw_range; // yaw axis total range of motion in degrees166AP_Int16 distance_min; // target's must be at least this distance from tracker to be tracked167AP_Int16 pitch_min;168AP_Int16 pitch_max;169AP_Int16 gcs_pid_mask;170AP_Int8 initial_mode;171AP_Int8 disarm_pwm;172AP_Int8 auto_opts;173174// Waypoints175//176AP_Int8 command_total; // 1 if HOME is set177178AP_Int32 log_bitmask;179180// AC_PID controllers181AC_PID pidPitch2Srv;182AC_PID pidYaw2Srv;183184Parameters() :185pidPitch2Srv(0.2, 0.0f, 0.05f, 0.02f, 4000.0f, 0.0f, 0.0f, 0.0f, 0.1f),186pidYaw2Srv (0.2, 0.0f, 0.05f, 0.02f, 4000.0f, 0.0f, 0.0f, 0.0f, 0.1f)187{}188};189190extern const AP_Param::Info var_info[];191192193