CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Camera/AP_Camera_Params.cpp
Views: 1798
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, 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
// @User: Standard
67
// @RebootRequired: True
68
AP_GROUPINFO("_FEEDBAK_PIN", 8, AP_Camera_Params, feedback_pin, -1),
69
70
// @Param: _FEEDBAK_POL
71
// @DisplayName: Camera feedback pin polarity
72
// @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
73
// @Values: 0:TriggerLow,1:TriggerHigh
74
// @User: Standard
75
AP_GROUPINFO("_FEEDBAK_POL", 9, AP_Camera_Params, feedback_polarity, 1),
76
77
// @Param: _OPTIONS
78
// @DisplayName: Camera options
79
// @Description: Camera options bitmask
80
// @Bitmask: 0:Recording Starts at arming and stops at disarming
81
// @User: Standard
82
AP_GROUPINFO("_OPTIONS", 10, AP_Camera_Params, options, 0),
83
84
// @Param: _MNT_INST
85
// @DisplayName: Camera Mount instance
86
// @Description: Mount instance camera is associated with. 0 means camera and mount have identical instance numbers e.g. camera1 and mount1
87
// @User: Standard
88
AP_GROUPINFO("_MNT_INST", 11, AP_Camera_Params, mount_instance, 0),
89
90
// @Param: _HFOV
91
// @DisplayName: Camera horizontal field of view
92
// @Description: Camera horizontal field of view. 0 if unknown
93
// @Units: deg
94
// @Range: 0 360
95
// @User: Standard
96
AP_GROUPINFO("_HFOV", 12, AP_Camera_Params, hfov, 0),
97
98
// @Param: _VFOV
99
// @DisplayName: Camera vertical field of view
100
// @Description: Camera vertical field of view. 0 if unknown
101
// @Units: deg
102
// @Range: 0 180
103
// @User: Standard
104
AP_GROUPINFO("_VFOV", 13, AP_Camera_Params, vfov, 0),
105
106
AP_GROUPEND
107
108
};
109
110
AP_Camera_Params::AP_Camera_Params(void) {
111
AP_Param::setup_object_defaults(this, var_info);
112
}
113
114