Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_Camera/AP_Camera_Mount.h
Views: 1798
/*1This program is free software: you can redistribute it and/or modify2it under the terms of the GNU General Public License as published by3the Free Software Foundation, either version 3 of the License, or4(at your option) any later version.56This program is distributed in the hope that it will be useful,7but WITHOUT ANY WARRANTY; without even the implied warranty of8MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9GNU General Public License for more details.1011You should have received a copy of the GNU General Public License12along with this program. If not, see <http://www.gnu.org/licenses/>.13*/1415/*16Camera driver for cameras included in Mount17*/18#pragma once1920#include "AP_Camera_Backend.h"2122#if AP_CAMERA_MOUNT_ENABLED2324#include "AP_Camera.h"2526class AP_Camera_Mount : public AP_Camera_Backend27{28public:2930// Constructor31using AP_Camera_Backend::AP_Camera_Backend;3233/* Do not allow copies */34CLASS_NO_COPY(AP_Camera_Mount);3536// entry point to actually take a picture. returns true on success37bool trigger_pic() override;3839// start or stop video recording. returns true on success40// set start_recording = true to start record, false to stop recording41bool record_video(bool start_recording) override;4243// set zoom specified as a rate or percentage44bool set_zoom(ZoomType zoom_type, float zoom_value) override;4546// set focus specified as rate, percentage or auto47// focus in = -1, focus hold = 0, focus out = 148SetFocusResult set_focus(FocusType focus_type, float focus_value) override;4950// set tracking to none, point or rectangle (see TrackingType enum)51// if POINT only p1 is used, if RECTANGLE then p1 is top-left, p2 is bottom-right52// p1,p2 are in range 0 to 1. 0 is left or top, 1 is right or bottom53bool set_tracking(TrackingType tracking_type, const Vector2f& p1, const Vector2f& p2) override;5455// set camera lens as a value from 0 to 556bool set_lens(uint8_t lens) override;5758#if AP_CAMERA_SET_CAMERA_SOURCE_ENABLED59// set_camera_source is functionally the same as set_lens except primary and secondary lenses are specified by type60bool set_camera_source(AP_Camera::CameraSource primary_source, AP_Camera::CameraSource secondary_source) override;61#endif // AP_CAMERA_SET_CAMERA_SOURCE_ENABLED6263// send camera information message to GCS64void send_camera_information(mavlink_channel_t chan) const override;6566// send camera settings message to GCS67void send_camera_settings(mavlink_channel_t chan) const override;6869// send camera capture status message to GCS70void send_camera_capture_status(mavlink_channel_t chan) const override;7172#if AP_CAMERA_SEND_THERMAL_RANGE_ENABLED73// send camera thermal range message to GCS74void send_camera_thermal_range(mavlink_channel_t chan) const override;75#endif7677#if AP_CAMERA_SCRIPTING_ENABLED78// change camera settings not normally used by autopilot79bool change_setting(CameraSetting setting, float value) override;80#endif81};8283#endif // AP_CAMERA_MOUNT_ENABLED848586