2020-02-09 01:47:52 -04:00
|
|
|
#pragma once
|
|
|
|
|
2023-05-26 01:16:12 -03:00
|
|
|
#include "AP_Camera_config.h"
|
2020-07-24 14:31:42 -03:00
|
|
|
|
2023-03-06 19:04:39 -04:00
|
|
|
#if AP_CAMERA_SOLOGIMBAL_ENABLED
|
2023-02-10 20:27:39 -04:00
|
|
|
|
2023-05-26 01:16:12 -03:00
|
|
|
#include "AP_Camera_Backend.h"
|
2023-02-10 20:27:39 -04:00
|
|
|
#include <GCS_MAVLink/GCS_MAVLink.h>
|
2020-02-09 01:47:52 -04:00
|
|
|
|
2023-02-10 20:27:39 -04:00
|
|
|
class AP_Camera_SoloGimbal : public AP_Camera_Backend
|
|
|
|
{
|
2020-02-09 01:47:52 -04:00
|
|
|
public:
|
|
|
|
|
2023-02-10 20:27:39 -04:00
|
|
|
// Constructor
|
|
|
|
using AP_Camera_Backend::AP_Camera_Backend;
|
|
|
|
|
|
|
|
/* Do not allow copies */
|
|
|
|
CLASS_NO_COPY(AP_Camera_SoloGimbal);
|
|
|
|
|
|
|
|
// entry point to actually take a picture. returns true on success
|
|
|
|
bool trigger_pic() override;
|
|
|
|
|
|
|
|
// momentary switch to change camera between picture and video modes
|
|
|
|
void cam_mode_toggle() override;
|
|
|
|
|
2023-04-28 20:54:00 -03:00
|
|
|
// handle MAVLink messages from the camera
|
2023-02-10 20:27:39 -04:00
|
|
|
void handle_message(mavlink_channel_t chan, const mavlink_message_t &msg) override;
|
2020-02-09 01:47:52 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2023-02-10 20:27:39 -04:00
|
|
|
GOPRO_CAPTURE_MODE gopro_capture_mode;
|
|
|
|
GOPRO_HEARTBEAT_STATUS gopro_status;
|
|
|
|
bool gopro_is_recording;
|
|
|
|
mavlink_channel_t heartbeat_channel;
|
2020-02-09 01:47:52 -04:00
|
|
|
};
|
2020-07-24 14:31:42 -03:00
|
|
|
|
2023-03-06 19:04:39 -04:00
|
|
|
#endif // AP_CAMERA_SOLOGIMBAL_ENABLED
|