LCOV - code coverage report
Current view: top level - AP_Camera - AP_Camera_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_Camera_Params.h"
       2             : 
       3             : // table of user settable parameters
       4             : const AP_Param::GroupInfo AP_Camera_Params::var_info[] = {
       5             : 
       6             :     // 0 should not be used
       7             : 
       8             :     // @Param: _TYPE
       9             :     // @DisplayName: Camera shutter (trigger) type
      10             :     // @Description: how to trigger the camera to take a picture
      11             :     // @Values: 0:None, 1:Servo, 2:Relay, 3:GoPro in Solo Gimbal, 4:Mount (Siyi/Topotek/Viewpro/Xacti), 5:MAVLink, 6:MAVLinkCamV2 (Gremsy/AVT), 7:Scripting, 8:RunCam
      12             :     // @RebootRequired: True
      13             :     // @User: Standard
      14             :     AP_GROUPINFO_FLAGS("_TYPE",  1, AP_Camera_Params, type, 0, AP_PARAM_FLAG_ENABLE),
      15             : 
      16             :     // @Param: _DURATION
      17             :     // @DisplayName: Camera shutter duration held open
      18             :     // @Description: Duration in seconds that the camera shutter is held open
      19             :     // @Units: s
      20             :     // @Range: 0 5
      21             :     // @User: Standard
      22             :     AP_GROUPINFO("_DURATION", 2, AP_Camera_Params, trigger_duration, 0.1),
      23             : 
      24             :     // @Param: _SERVO_ON
      25             :     // @DisplayName: Camera servo ON PWM value
      26             :     // @Description: PWM value in microseconds to move servo to when shutter is activated
      27             :     // @Units: PWM
      28             :     // @Range: 1000 2000
      29             :     // @User: Standard
      30             :     AP_GROUPINFO("_SERVO_ON", 3, AP_Camera_Params, servo_on_pwm, 1300),
      31             : 
      32             :     // @Param: _SERVO_OFF
      33             :     // @DisplayName: Camera servo OFF PWM value
      34             :     // @Description: PWM value in microseconds to move servo to when shutter is deactivated
      35             :     // @Units: PWM
      36             :     // @Range: 1000 2000
      37             :     // @User: Standard
      38             :     AP_GROUPINFO("_SERVO_OFF", 4, AP_Camera_Params, servo_off_pwm, 1100),
      39             : 
      40             :     // @Param: _TRIGG_DIST
      41             :     // @DisplayName: Camera trigger distance
      42             :     // @Description: Distance in meters between camera triggers. If this value is non-zero then the camera will trigger whenever the position changes by this number of meters regardless of what mode the APM is in. Note that this parameter can also be set in an auto mission using the DO_SET_CAM_TRIGG_DIST command, allowing you to enable/disable the triggering of the camera during the flight.
      43             :     // @User: Standard
      44             :     // @Units: m
      45             :     // @Range: 0 1000
      46             :     AP_GROUPINFO("_TRIGG_DIST", 5, AP_Camera_Params, trigg_dist, 0),
      47             : 
      48             :     // @Param: _RELAY_ON
      49             :     // @DisplayName: Camera relay ON value
      50             :     // @Description: This sets whether the relay goes high or low when it triggers. Note that you should also set RELAY_DEFAULT appropriately for your camera
      51             :     // @Values: 0:Low,1:High
      52             :     // @User: Standard
      53             :     AP_GROUPINFO("_RELAY_ON", 6, AP_Camera_Params, relay_on, 1),
      54             : 
      55             :     // @Param: _INTRVAL_MIN
      56             :     // @DisplayName: Camera minimum time interval between photos
      57             :     // @Description: Postpone shooting if previous picture was taken less than this many seconds ago
      58             :     // @Units: s
      59             :     // @Range: 0 10
      60             :     // @User: Standard
      61             :     AP_GROUPINFO("_INTRVAL_MIN", 7, AP_Camera_Params, interval_min, 0),
      62             : 
      63             :     // @Param: _FEEDBAK_PIN
      64             :     // @DisplayName: Camera feedback pin
      65             :     // @Description: pin number to use for save accurate camera feedback messages. If set to -1 then don't use a pin flag for this, otherwise this is a pin number which if held high after a picture trigger order, will save camera messages when camera really takes a picture. A universal camera hot shoe is needed. The pin should be held high for at least 2 milliseconds for reliable trigger detection.  Some common values are given, but see the Wiki's "GPIOs" page for how to determine the pin number for a given autopilot. See also the CAMx_FEEDBCK_POL option.
      66             :     // @Values: -1:Disabled,50:AUX1,51:AUX2,52:AUX3,53:AUX4,54:AUX5,55:AUX6
      67             :     // @Range: -1 127
      68             :     // @User: Standard
      69             :     // @RebootRequired: True
      70             :     AP_GROUPINFO("_FEEDBAK_PIN", 8, AP_Camera_Params, feedback_pin, -1),
      71             : 
      72             :     // @Param: _FEEDBAK_POL
      73             :     // @DisplayName: Camera feedback pin polarity
      74             :     // @Description: Polarity for feedback pin. If this is 1 then the feedback pin should go high on trigger. If set to 0 then it should go low
      75             :     // @Values: 0:TriggerLow,1:TriggerHigh
      76             :     // @User: Standard
      77             :     AP_GROUPINFO("_FEEDBAK_POL", 9, AP_Camera_Params, feedback_polarity, 1),
      78             : 
      79             :     // @Param: _OPTIONS
      80             :     // @DisplayName: Camera options
      81             :     // @Description: Camera options bitmask
      82             :     // @Bitmask: 0:Recording Starts at arming and stops at disarming
      83             :     // @User: Standard
      84             :     AP_GROUPINFO("_OPTIONS", 10, AP_Camera_Params, options, 0),
      85             : 
      86             :     // @Param: _MNT_INST
      87             :     // @DisplayName: Camera Mount instance
      88             :     // @Description: Mount instance camera is associated with. 0 means camera and mount have identical instance numbers e.g. camera1 and mount1
      89             :     // @User: Standard
      90             :     AP_GROUPINFO("_MNT_INST", 11, AP_Camera_Params, mount_instance, 0),
      91             : 
      92             :     // @Param: _HFOV
      93             :     // @DisplayName: Camera horizontal field of view
      94             :     // @Description: Camera horizontal field of view. 0 if unknown
      95             :     // @Units: deg
      96             :     // @Range: 0 360
      97             :     // @User: Standard
      98             :     AP_GROUPINFO("_HFOV", 12, AP_Camera_Params, hfov, 0),
      99             : 
     100             :     // @Param: _VFOV
     101             :     // @DisplayName: Camera vertical field of view
     102             :     // @Description: Camera vertical field of view. 0 if unknown
     103             :     // @Units: deg
     104             :     // @Range: 0 180
     105             :     // @User: Standard
     106             :     AP_GROUPINFO("_VFOV", 13, AP_Camera_Params, vfov, 0),
     107             : 
     108             :     AP_GROUPEND
     109             : 
     110             : };
     111             : 
     112        4122 : AP_Camera_Params::AP_Camera_Params(void) {
     113        4122 :     AP_Param::setup_object_defaults(this, var_info);
     114        4122 : }

Generated by: LCOV version 1.14