LCOV - code coverage report
Current view: top level - home/pbarker/rc/ardupilot/AntennaTracker - Parameters.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 4 4 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 tracker
       4             : 
       5             : #include <AC_PID/AC_PID.h>
       6             : #include <AP_Param/AP_Param.h>
       7             : 
       8             : // Global parameter class.
       9             : //
      10             : class Parameters {
      11             : public:
      12             : 
      13             :     /*
      14             :      *  The value of k_format_version determines whether the existing
      15             :      *  eeprom data is considered valid. You should only change this
      16             :      *  value under the following circumstances:
      17             :      *
      18             :      *  1) the meaning of an existing eeprom parameter changes
      19             :      *
      20             :      *  2) the value of an existing k_param_* enum value changes
      21             :      *
      22             :      *  Adding a new parameter should _not_ require a change to
      23             :      *  k_format_version except under special circumstances. If you
      24             :      *  change it anyway then all ArduPlane users will need to reload all
      25             :      *  their parameters. We want that to be an extremely rare
      26             :      *  thing. Please do not just change it "just in case".
      27             :      *
      28             :      *  To determine if a k_param_* value has changed, use the rules of
      29             :      *  C++ enums to work out the value of the neighboring enum
      30             :      *  values. If you don't know the C++ enum rules then please ask for
      31             :      *  help.
      32             :      */
      33             : 
      34             :     //////////////////////////////////////////////////////////////////
      35             :     // STOP!!! DO NOT CHANGE THIS VALUE UNTIL YOU FULLY UNDERSTAND THE
      36             :     // COMMENTS ABOVE. IF UNSURE, ASK ANOTHER DEVELOPER!!!
      37             :     static const uint16_t k_format_version = 1;
      38             :     //////////////////////////////////////////////////////////////////
      39             : 
      40             : 
      41             :     enum {
      42             :         // Layout version number, always key zero.
      43             :         //
      44             :         k_param_format_version = 0,
      45             :         k_param_software_type,      // deprecated
      46             : 
      47             :         k_param_gcs0_unused = 100,  // unused in ArduPilot-4.7
      48             :         k_param_gcs1_unused,        // unused in ArduPilot-4.7
      49             :         k_param_sysid_this_mav_old,
      50             :         k_param_sysid_my_gcs_old,
      51             :         k_param_serial0_baud,       // deprecated
      52             :         k_param_serial1_baud,       // deprecated
      53             :         k_param_imu,
      54             :         k_param_compass_enabled_deprecated,
      55             :         k_param_compass,
      56             :         k_param_ahrs,  // AHRS group
      57             :         k_param_barometer,
      58             :         k_param_scheduler,
      59             :         k_param_ins,
      60             :         k_param_sitl,
      61             :         k_param_pidPitch_old,   // deprecated
      62             :         k_param_pidYaw_old,     // deprecated
      63             :         k_param_gcs2_unused,        // unused in ArduPilot-4.7
      64             :         k_param_serial2_baud,       // deprecated
      65             : 
      66             :         k_param_yaw_slew_time,
      67             :         k_param_pitch_slew_time,
      68             :         k_param_min_reverse_time,
      69             : 
      70             :         k_param_start_latitude,
      71             :         k_param_start_longitude,
      72             :         k_param_startup_delay,
      73             :         k_param_BoardConfig,
      74             :         k_param_gps,
      75             :         k_param_scan_speed_unused, // deprecated
      76             :         k_param_proxy_mode_unused, // deprecated
      77             :         k_param_servo_pitch_type,
      78             :         k_param_onoff_yaw_rate,
      79             :         k_param_onoff_pitch_rate,
      80             :         k_param_onoff_yaw_mintime,
      81             :         k_param_onoff_pitch_mintime,
      82             :         k_param_yaw_trim,
      83             :         k_param_pitch_trim,
      84             :         k_param_yaw_range,
      85             :         k_param_pitch_range,    //deprecated
      86             :         k_param_distance_min,
      87             :         k_param_sysid_target,       // 138
      88             :         k_param_gcs3_unused,        // unused in ArduPilot-4.7
      89             :         k_param_log_bitmask,        // 140
      90             :         k_param_notify,
      91             :         k_param_can_mgr,
      92             :         k_param_battery,
      93             : 
      94             :         k_param_serial_manager_old = 144,     // serial manager library
      95             :         k_param_servo_yaw_type,
      96             :         k_param_alt_source,
      97             :         k_param_mavlink_update_rate,
      98             :         k_param_pitch_min,
      99             :         k_param_pitch_max,
     100             :         k_param_gcs4_unused,        // unused in ArduPilot-4.7
     101             :         k_param_gcs5_unused,        // unused in ArduPilot-4.7
     102             :         k_param_gcs6_unused,        // unused in ArduPilot-4.7
     103             : 
     104             :         //
     105             :         // 200 : Radio settings
     106             :         //
     107             :         k_param_channel_yaw_old = 200,
     108             :         k_param_channel_pitch_old,
     109             :         k_param_pidPitch2Srv,
     110             :         k_param_pidYaw2Srv,
     111             :         k_param_rc_channels,
     112             :         k_param_servo_channels,
     113             : 
     114             :         k_param_stats_old = 218,
     115             :         k_param_scripting_old = 219,
     116             : 
     117             :         //
     118             :         // 220: Waypoint data
     119             :         //
     120             :         k_param_command_total = 220,
     121             : 
     122             :         // 254,255: reserved
     123             :         k_param_gcs_pid_mask = 225,
     124             :         k_param_scan_speed_yaw,
     125             :         k_param_scan_speed_pitch,
     126             :         k_param_initial_mode,
     127             :         k_param_disarm_pwm,
     128             : 
     129             :         k_param_auto_opts,
     130             :         k_param_NavEKF2,
     131             :         k_param_NavEKF3,
     132             : 
     133             :         k_param_logger = 253, // 253 - Logging Group
     134             : 
     135             :         k_param_vehicle = 257, // vehicle common block of parameters
     136             :         k_param__gcs = 258,
     137             :     };
     138             : 
     139             :     AP_Int16 format_version;
     140             : 
     141             :     // Telemetry control
     142             :     //
     143             :     AP_Int16 sysid_target;
     144             : 
     145             :     AP_Float yaw_slew_time;
     146             :     AP_Float pitch_slew_time;
     147             :     AP_Float min_reverse_time;
     148             :     AP_Int16 scan_speed_yaw;
     149             :     AP_Int16 scan_speed_pitch;
     150             : 
     151             :     AP_Float start_latitude;
     152             :     AP_Float start_longitude;
     153             : 
     154             :     AP_Float startup_delay;
     155             :     AP_Int8  servo_pitch_type;
     156             :     AP_Int8  servo_yaw_type;
     157             :     AP_Int8  alt_source;
     158             :     AP_Int8  mavlink_update_rate;
     159             :     AP_Float onoff_yaw_rate;
     160             :     AP_Float onoff_pitch_rate;
     161             :     AP_Float onoff_yaw_mintime;
     162             :     AP_Float onoff_pitch_mintime;
     163             :     AP_Float yaw_trim;
     164             :     AP_Float pitch_trim;
     165             :     AP_Int16 yaw_range;             // yaw axis total range of motion in degrees
     166             :     AP_Int16 distance_min;          // target's must be at least this distance from tracker to be tracked
     167             :     AP_Int16 pitch_min;
     168             :     AP_Int16 pitch_max;
     169             :     AP_Int16 gcs_pid_mask;
     170             :     AP_Int8  initial_mode;
     171             :     AP_Int8 disarm_pwm;
     172             :     AP_Int8 auto_opts;
     173             : 
     174             :     // Waypoints
     175             :     //
     176             :     AP_Int8 command_total; // 1 if HOME is set
     177             : 
     178             :     AP_Int32 log_bitmask;
     179             : 
     180             :     // AC_PID controllers
     181             :     AC_PID         pidPitch2Srv;
     182             :     AC_PID         pidYaw2Srv;
     183             : 
     184          33 :     Parameters() :
     185          33 :         pidPitch2Srv(0.2, 0.0f, 0.05f, 0.02f, 4000.0f, 0.0f, 0.0f, 0.0f, 0.1f),
     186          66 :         pidYaw2Srv  (0.2, 0.0f, 0.05f, 0.02f, 4000.0f, 0.0f, 0.0f, 0.0f, 0.1f)
     187          33 :         {}
     188             : };
     189             : 
     190             : extern const AP_Param::Info var_info[];

Generated by: LCOV version 1.14