LCOV - code coverage report
Current view: top level - AP_Mount - AP_Mount_Params.cpp (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             : #include "AP_Mount_Params.h"
       2             : #include <GCS_MAVLink/GCS_MAVLink.h>
       3             : 
       4             : // table of user settable parameters
       5             : const AP_Param::GroupInfo AP_Mount_Params::var_info[] = {
       6             : 
       7             :     // 0 should not be used
       8             : 
       9             :     // @Param: _TYPE
      10             :     // @DisplayName: Mount Type
      11             :     // @Description: Mount Type
      12             :     // @SortValues: AlphabeticalZeroAtTop
      13             :     // @Values: 0:None, 1:Servo, 2:3DR Solo, 3:Alexmos Serial, 4:SToRM32 MAVLink, 5:SToRM32 Serial, 6:MAVLink (Gremsy/AVT), 7:BrushlessPWM, 8:Siyi, 9:Scripting, 10:Xacti, 11:Viewpro, 12:Topotek, 13:CADDX, 14:XFRobot
      14             :     // @RebootRequired: True
      15             :     // @User: Standard
      16             :     AP_GROUPINFO_FLAGS("_TYPE", 1, AP_Mount_Params, type, 0, AP_PARAM_FLAG_ENABLE),
      17             : 
      18             :     // @Param: _DEFLT_MODE
      19             :     // @DisplayName: Mount default operating mode
      20             :     // @Description: Mount default operating mode on startup and after control is returned from autopilot
      21             :     // @Values: 0:Retracted,1:Neutral,2:MavLink Targeting,3:RC Targeting,4:GPS Point,5:SysID Target,6:Home Location
      22             :     // @User: Standard
      23             :     AP_GROUPINFO("_DEFLT_MODE", 2, AP_Mount_Params, default_mode, MAV_MOUNT_MODE_RC_TARGETING),
      24             : 
      25             :     // @Param: _RC_RATE
      26             :     // @DisplayName: Mount RC Rate
      27             :     // @Description: Pilot rate control's maximum rate.  Set to zero to use angle control
      28             :     // @Units: deg/s
      29             :     // @Range: 0 90
      30             :     // @Increment: 1
      31             :     // @User: Standard
      32             :     AP_GROUPINFO("_RC_RATE", 3, AP_Mount_Params, rc_rate_max, 0),
      33             : 
      34             :     // @Param: _ROLL_MIN
      35             :     // @DisplayName: Mount Roll angle minimum
      36             :     // @Description: Mount Roll angle minimum
      37             :     // @Units: deg
      38             :     // @Range: -180 180
      39             :     // @Increment: 1
      40             :     // @User: Standard
      41             :     AP_GROUPINFO("_ROLL_MIN", 4, AP_Mount_Params, roll_angle_min, -30),
      42             : 
      43             :     // @Param: _ROLL_MAX
      44             :     // @DisplayName: Mount Roll angle maximum
      45             :     // @Description: Mount Roll angle maximum
      46             :     // @Units: deg
      47             :     // @Range: -180 180
      48             :     // @Increment: 1
      49             :     // @User: Standard
      50             :     AP_GROUPINFO("_ROLL_MAX", 5, AP_Mount_Params, roll_angle_max, 30),
      51             : 
      52             :     // @Param: _PITCH_MIN
      53             :     // @DisplayName: Mount Pitch angle minimum
      54             :     // @Description: Mount Pitch angle minimum
      55             :     // @Units: deg
      56             :     // @Range: -90 90
      57             :     // @Increment: 1
      58             :     // @User: Standard
      59             :     AP_GROUPINFO("_PITCH_MIN", 6, AP_Mount_Params, pitch_angle_min, -90),
      60             : 
      61             :     // @Param: _PITCH_MAX
      62             :     // @DisplayName: Mount Pitch angle maximum
      63             :     // @Description: Mount Pitch angle maximum
      64             :     // @Units: deg
      65             :     // @Range: -90 90
      66             :     // @Increment: 1
      67             :     // @User: Standard
      68             :     AP_GROUPINFO("_PITCH_MAX", 7, AP_Mount_Params, pitch_angle_max, 20),
      69             : 
      70             :     // @Param: _YAW_MIN
      71             :     // @DisplayName: Mount Yaw angle minimum
      72             :     // @Description: Mount Yaw angle minimum
      73             :     // @Units: deg
      74             :     // @Range: -180 180
      75             :     // @Increment: 1
      76             :     // @User: Standard
      77             :     AP_GROUPINFO("_YAW_MIN", 8, AP_Mount_Params, yaw_angle_min,  -180),
      78             : 
      79             :     // @Param: _YAW_MAX
      80             :     // @DisplayName: Mount Yaw angle maximum
      81             :     // @Description: Mount Yaw angle maximum
      82             :     // @Units: deg
      83             :     // @Range: -180 180
      84             :     // @Increment: 1
      85             :     // @User: Standard
      86             :     AP_GROUPINFO("_YAW_MAX", 9, AP_Mount_Params, yaw_angle_max,  180),
      87             : 
      88             :     // @Param: _RETRACT_X
      89             :     // @DisplayName: Mount roll angle when in retracted position
      90             :     // @Description: Mount roll angle when in retracted position
      91             :     // @Units: deg
      92             :     // @Range: -180.0 180.0
      93             :     // @Increment: 1
      94             :     // @User: Standard
      95             : 
      96             :     // @Param: _RETRACT_Y
      97             :     // @DisplayName: Mount pitch angle when in retracted position
      98             :     // @Description: Mount pitch angle when in retracted position
      99             :     // @Units: deg
     100             :     // @Range: -180.0 180.0
     101             :     // @Increment: 1
     102             :     // @User: Standard
     103             : 
     104             :     // @Param: _RETRACT_Z
     105             :     // @DisplayName: Mount yaw angle when in retracted position
     106             :     // @Description: Mount yaw angle when in retracted position
     107             :     // @Units: deg
     108             :     // @Range: -180.0 180.0
     109             :     // @Increment: 1
     110             :     // @User: Standard
     111             :     AP_GROUPINFO("_RETRACT", 10, AP_Mount_Params, retract_angles, 0),
     112             : 
     113             :     // @Param: _NEUTRAL_X
     114             :     // @DisplayName: Mount roll angle when in neutral position
     115             :     // @Description: Mount roll angle when in neutral position
     116             :     // @Units: deg
     117             :     // @Range: -180.0 180.0
     118             :     // @Increment: 1
     119             :     // @User: Standard
     120             : 
     121             :     // @Param: _NEUTRAL_Y
     122             :     // @DisplayName: Mount pitch angle when in neutral position
     123             :     // @Description: Mount pitch angle when in neutral position
     124             :     // @Units: deg
     125             :     // @Range: -180.0 180.0
     126             :     // @Increment: 1
     127             :     // @User: Standard
     128             : 
     129             :     // @Param: _NEUTRAL_Z
     130             :     // @DisplayName: Mount yaw angle when in neutral position
     131             :     // @Description: Mount yaw angle when in neutral position
     132             :     // @Units: deg
     133             :     // @Range: -180.0 180.0
     134             :     // @Increment: 1
     135             :     // @User: Standard
     136             :     AP_GROUPINFO("_NEUTRAL", 11, AP_Mount_Params, neutral_angles, 0),
     137             : 
     138             :     // @Param: _LEAD_RLL
     139             :     // @DisplayName: Mount Roll stabilization lead time
     140             :     // @Description: Servo mount roll angle output leads the vehicle angle by this amount of time based on current roll rate. Increase until the servo is responsive but does not overshoot
     141             :     // @Units: s
     142             :     // @Range: 0.0 0.2
     143             :     // @Increment: 0.005
     144             :     // @User: Standard
     145             :     AP_GROUPINFO("_LEAD_RLL", 12, AP_Mount_Params, roll_stb_lead, 0.0f),
     146             : 
     147             :     // @Param: _LEAD_PTCH
     148             :     // @DisplayName: Mount Pitch stabilization lead time
     149             :     // @Description: Servo mount pitch angle output leads the vehicle angle by this amount of time based on current pitch rate. Increase until the servo is responsive but does not overshoot
     150             :     // @Units: s
     151             :     // @Range: 0.0 0.2
     152             :     // @Increment: 0.005
     153             :     // @User: Standard
     154             :     AP_GROUPINFO("_LEAD_PTCH", 13, AP_Mount_Params, pitch_stb_lead, 0.0f),
     155             : 
     156             :     // @Param: _SYSID_DFLT
     157             :     // @DisplayName: Mount Target sysID
     158             :     // @Description: Default Target sysID for the mount to point to
     159             :     // @RebootRequired: True
     160             :     // @User: Standard
     161             :     AP_GROUPINFO("_SYSID_DFLT", 14, AP_Mount_Params, sysid_default, 0),
     162             : 
     163             :     // @Param: _DEVID
     164             :     // @DisplayName: Mount Device ID
     165             :     // @Description: Mount device ID, taking into account its type, bus and instance
     166             :     // @User: Advanced
     167             :     AP_GROUPINFO_FLAGS("_DEVID", 15, AP_Mount_Params, dev_id, 0, AP_PARAM_FLAG_INTERNAL_USE_ONLY),
     168             : 
     169             :     // @Param: _OPTIONS
     170             :     // @DisplayName: Mount options
     171             :     // @Description: Mount options bitmask, note bit 2 only impacts RC targetting mode
     172             :     // @Bitmask: 0:RC lock state from previous mode, 1:Return to neutral angles on RC failsafe, 2:Force FPV (bf) lock on roll and pitch
     173             :     // @User: Standard
     174             :     AP_GROUPINFO("_OPTIONS", 16, AP_Mount_Params, options, 0),
     175             : 
     176             :     AP_GROUPEND
     177             : };
     178             : 
     179        4122 : AP_Mount_Params::AP_Mount_Params(void) {
     180        4122 :     AP_Param::setup_object_defaults(this, var_info);
     181        4122 : }

Generated by: LCOV version 1.14