Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Camera/AP_Camera_Params.cpp
9460 views
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
// @User: Standard
13
AP_GROUPINFO_FLAGS("_TYPE", 1, AP_Camera_Params, type, 0, AP_PARAM_FLAG_ENABLE),
14
15
// @Param: _DURATION
16
// @DisplayName: Camera shutter duration held open
17
// @Description: Duration in seconds that the camera shutter is held open
18
// @Units: s
19
// @Range: 0 5
20
// @User: Standard
21
AP_GROUPINFO("_DURATION", 2, AP_Camera_Params, trigger_duration, 0.1),
22
23
// @Param: _SERVO_ON
24
// @DisplayName: Camera servo ON PWM value
25
// @Description: PWM value in microseconds to move servo to when shutter is activated
26
// @Units: PWM
27
// @Range: 1000 2000
28
// @User: Standard
29
AP_GROUPINFO("_SERVO_ON", 3, AP_Camera_Params, servo_on_pwm, 1300),
30
31
// @Param: _SERVO_OFF
32
// @DisplayName: Camera servo OFF PWM value
33
// @Description: PWM value in microseconds to move servo to when shutter is deactivated
34
// @Units: PWM
35
// @Range: 1000 2000
36
// @User: Standard
37
AP_GROUPINFO("_SERVO_OFF", 4, AP_Camera_Params, servo_off_pwm, 1100),
38
39
// @Param: _TRIGG_DIST
40
// @DisplayName: Camera trigger distance
41
// @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.
42
// @User: Standard
43
// @Units: m
44
// @Range: 0 1000
45
AP_GROUPINFO("_TRIGG_DIST", 5, AP_Camera_Params, trigg_dist, 0),
46
47
// @Param: _RELAY_ON
48
// @DisplayName: Camera relay ON value
49
// @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
50
// @Values: 0:Low,1:High
51
// @User: Standard
52
AP_GROUPINFO("_RELAY_ON", 6, AP_Camera_Params, relay_on, 1),
53
54
// @Param: _INTRVAL_MIN
55
// @DisplayName: Camera minimum time interval between photos
56
// @Description: Postpone shooting if previous picture was taken less than this many seconds ago
57
// @Units: s
58
// @Range: 0 10
59
// @User: Standard
60
AP_GROUPINFO("_INTRVAL_MIN", 7, AP_Camera_Params, interval_min, 0),
61
62
// @Param: _FEEDBAK_PIN
63
// @DisplayName: Camera feedback pin
64
// @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.
65
// @Values: -1:Disabled,50:AUX1,51:AUX2,52:AUX3,53:AUX4,54:AUX5,55:AUX6
66
// @Range: -1 127
67
// @User: Standard
68
// @RebootRequired: True
69
AP_GROUPINFO("_FEEDBAK_PIN", 8, AP_Camera_Params, feedback_pin, -1),
70
71
// @Param: _FEEDBAK_POL
72
// @DisplayName: Camera feedback pin polarity
73
// @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
74
// @Values: 0:TriggerLow,1:TriggerHigh
75
// @User: Standard
76
AP_GROUPINFO("_FEEDBAK_POL", 9, AP_Camera_Params, feedback_polarity, 1),
77
78
// @Param: _OPTIONS
79
// @DisplayName: Camera options
80
// @Description: Camera options bitmask
81
// @Bitmask: 0:Recording Starts at arming and stops at disarming
82
// @User: Standard
83
AP_GROUPINFO("_OPTIONS", 10, AP_Camera_Params, options, 0),
84
85
// @Param: _MNT_INST
86
// @DisplayName: Camera Mount instance
87
// @Description: Mount instance camera is associated with. 0 means camera and mount have identical instance numbers e.g. camera1 and mount1
88
// @User: Standard
89
AP_GROUPINFO("_MNT_INST", 11, AP_Camera_Params, mount_instance, 0),
90
91
// @Param: _HFOV
92
// @DisplayName: Camera horizontal field of view
93
// @Description: Camera horizontal field of view. 0 if unknown
94
// @Units: deg
95
// @Range: 0 360
96
// @User: Standard
97
AP_GROUPINFO("_HFOV", 12, AP_Camera_Params, hfov, 0),
98
99
// @Param: _VFOV
100
// @DisplayName: Camera vertical field of view
101
// @Description: Camera vertical field of view. 0 if unknown
102
// @Units: deg
103
// @Range: 0 180
104
// @User: Standard
105
AP_GROUPINFO("_VFOV", 13, AP_Camera_Params, vfov, 0),
106
107
AP_GROUPEND
108
109
};
110
111
AP_Camera_Params::AP_Camera_Params(void) {
112
AP_Param::setup_object_defaults(this, var_info);
113
}
114
115