mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
camera_feedback : move class definitions into hpp
This commit is contained in:
committed by
Lorenz Meier
parent
97ceaf404c
commit
83888e3e7f
@@ -39,85 +39,7 @@
|
||||
* @author Mohammed Kabir <kabir@uasys.io>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <poll.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
#include <systemlib/systemlib.h>
|
||||
#include <systemlib/err.h>
|
||||
#include <systemlib/param/param.h>
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_posix.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/topics/camera_trigger.h>
|
||||
#include <uORB/topics/camera_capture.h>
|
||||
#include <uORB/topics/vehicle_attitude.h>
|
||||
#include <uORB/topics/vehicle_local_position.h>
|
||||
#include <uORB/topics/vehicle_global_position.h>
|
||||
|
||||
typedef enum : uint8_t {
|
||||
CAMERA_FEEDBACK_MODE_NONE = 0,
|
||||
CAMERA_FEEDBACK_MODE_TRIGGER,
|
||||
CAMERA_FEEDBACK_MODE_PWM
|
||||
} camera_feedback_mode_t;
|
||||
|
||||
class CameraFeedback
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
CameraFeedback();
|
||||
|
||||
/**
|
||||
* Destructor, also kills task.
|
||||
*/
|
||||
~CameraFeedback();
|
||||
|
||||
/**
|
||||
* Start the task.
|
||||
*
|
||||
* @return OK on success.
|
||||
*/
|
||||
int start();
|
||||
|
||||
/**
|
||||
* Stop the task.
|
||||
*/
|
||||
void stop();
|
||||
|
||||
private:
|
||||
|
||||
bool _task_should_exit; /**< if true, task should exit */
|
||||
int _main_task; /**< handle for task */
|
||||
|
||||
int _trigger_sub;
|
||||
int _lpos_sub;
|
||||
int _gpos_sub;
|
||||
int _att_sub;
|
||||
|
||||
orb_advert_t _capture_pub;
|
||||
|
||||
param_t _p_feedback;
|
||||
|
||||
camera_feedback_mode_t _camera_feedback_mode;
|
||||
|
||||
void task_main();
|
||||
|
||||
/**
|
||||
* Shim for calling task_main from task_create.
|
||||
*/
|
||||
static void task_main_trampoline(int argc, char *argv[]);
|
||||
|
||||
};
|
||||
#include "camera_feedback.hpp"
|
||||
|
||||
namespace camera_feedback
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user