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_shareddefs.h
Views: 1798
1
#pragma once
2
3
// Camera related definitions required by both AP_Camera and AP_Mount are here
4
// this avoids issues that would occur if AP_Mount and AP_Camera included each other
5
6
#include <stdint.h>
7
8
// set zoom specified as a rate or percentage
9
// enumerators match MAVLink CAMERA_ZOOM_TYPE
10
enum class ZoomType : uint8_t {
11
RATE = 1, // zoom in, out or hold (zoom out = -1, hold = 0, zoom in = 1). Same as ZOOM_TYPE_CONTINUOUS
12
PCT = 2 // zoom to a percentage (from 0 to 100) of the full range. Same as ZOOM_TYPE_RANGE
13
};
14
15
// set focus specified as a rate or percentage
16
// enumerators match MAVLink CAMERA_FOCUS_TYPE
17
enum class FocusType : uint8_t {
18
RATE = 1, // focus in, out or hold (focus in = -1, hold = 0, focus out = 1). Same as FOCUS_TYPE_CONTINUOUS
19
PCT = 2, // focus to a percentage (from 0 to 100) of the full range. Same as FOCUS_TYPE_RANGE
20
AUTO = 4 // focus automatically. Same as FOCUS_TYPE_AUTO
21
};
22
23
// result type of set_focus. Assumptions are made that this
24
// enumeration can be cast directly to MAV_RESULT.
25
enum class SetFocusResult : uint8_t {
26
ACCEPTED = 0,
27
INVALID_PARAMETERS = 2, // supported but invalid parameters, like MAV_RESULT_DENIED
28
UNSUPPORTED = 3,
29
FAILED = 4,
30
};
31
32
// tracking types when tracking an object in the video stream
33
enum class TrackingType : uint8_t {
34
TRK_NONE = 0, // tracking is inactive
35
TRK_POINT = 1, // tracking a point
36
TRK_RECTANGLE = 2 // tracking a rectangle
37
};
38
39
// camera settings not normally used by the autopilot
40
enum class CameraSetting {
41
THERMAL_PALETTE = 0, // set thermal palette
42
THERMAL_GAIN = 1, // set thermal gain, value of 0:low gain, 1:high gain
43
THERMAL_RAW_DATA = 2, // enable/disable thermal raw data
44
};
45
46