2023-02-10 20:27:39 -04:00
|
|
|
/*
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2023-03-03 02:50:07 -04:00
|
|
|
Camera driver for cameras that implement the older MAVLink camera protocol
|
2023-02-10 20:27:39 -04:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AP_Camera_Backend.h"
|
|
|
|
|
2023-03-06 19:04:30 -04:00
|
|
|
#if AP_CAMERA_MAVLINK_ENABLED
|
2023-02-10 20:27:39 -04:00
|
|
|
|
|
|
|
class AP_Camera_MAVLink : public AP_Camera_Backend
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
// Constructor
|
|
|
|
using AP_Camera_Backend::AP_Camera_Backend;
|
|
|
|
|
|
|
|
/* Do not allow copies */
|
|
|
|
CLASS_NO_COPY(AP_Camera_MAVLink);
|
|
|
|
|
|
|
|
// entry point to actually take a picture
|
|
|
|
bool trigger_pic() override;
|
|
|
|
|
|
|
|
// configure camera
|
2023-10-30 23:29:17 -03:00
|
|
|
void configure(float shooting_mode, float shutter_speed, float aperture, float ISO, int32_t exposure_type, int32_t cmd_id, float engine_cutoff_time) override;
|
2023-02-10 20:27:39 -04:00
|
|
|
|
|
|
|
// handle camera control message
|
2023-10-30 23:29:17 -03:00
|
|
|
void control(float session, float zoom_pos, float zoom_step, float focus_lock, int32_t shooting_cmd, int32_t cmd_id) override;
|
2023-02-10 20:27:39 -04:00
|
|
|
};
|
|
|
|
|
2023-03-06 19:04:30 -04:00
|
|
|
#endif // AP_CAMERA_MAVLINK_ENABLED
|