1 | /*!
|
---|
2 | * \file ParrotCamH.h
|
---|
3 | * \brief Class for ardrone2 horizontal camera
|
---|
4 | * \author Guillaume Sanahuja
|
---|
5 | * \date 2014/07/16
|
---|
6 | * \version 4.0
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifndef PARROTCAMH_H
|
---|
10 | #define PARROTCAMH_H
|
---|
11 |
|
---|
12 | #include "V4LCamera.h"
|
---|
13 |
|
---|
14 | struct regval_list {
|
---|
15 | uint16_t reg_num;
|
---|
16 | uint16_t size;
|
---|
17 | uint32_t value;
|
---|
18 | };
|
---|
19 |
|
---|
20 | namespace flair
|
---|
21 | {
|
---|
22 | namespace core
|
---|
23 | {
|
---|
24 | class FrameworkManager;
|
---|
25 | class I2cPort;
|
---|
26 | }
|
---|
27 | }
|
---|
28 |
|
---|
29 | namespace flair
|
---|
30 | {
|
---|
31 | namespace sensor
|
---|
32 | {
|
---|
33 | /*! \class ParrotCamH
|
---|
34 | *
|
---|
35 | * \brief Class for ardrone2 horizontal cameraH
|
---|
36 | */
|
---|
37 | class ParrotCamH : public V4LCamera
|
---|
38 | {
|
---|
39 | public:
|
---|
40 | /*!
|
---|
41 | * \brief Constructor
|
---|
42 | *
|
---|
43 | * Construct a ParrotCamH.
|
---|
44 | *
|
---|
45 | * \param parent parent
|
---|
46 | * \param name name
|
---|
47 | * \param width width
|
---|
48 | * \param height height
|
---|
49 | * \param priority priority of the Thread
|
---|
50 | */
|
---|
51 | ParrotCamH(const core::FrameworkManager* parent,std::string name,uint16_t width,uint16_t height,uint8_t priority);
|
---|
52 |
|
---|
53 | /*!
|
---|
54 | * \brief Destructor
|
---|
55 | *
|
---|
56 | */
|
---|
57 | ~ParrotCamH();
|
---|
58 |
|
---|
59 | private:
|
---|
60 | /*!
|
---|
61 | * \brief Set Gain
|
---|
62 | *
|
---|
63 | * Reimplemented from V4LCamera class
|
---|
64 | *
|
---|
65 | * \param value value between 0 and 1
|
---|
66 | */
|
---|
67 | void SetGain(float value);
|
---|
68 |
|
---|
69 | /*!
|
---|
70 | * \brief Set Exposure
|
---|
71 | *
|
---|
72 | * Reimplemented from V4LCamera class
|
---|
73 | *
|
---|
74 | * \param value value between 0 and 1
|
---|
75 | */
|
---|
76 | void SetExposure(float value);
|
---|
77 |
|
---|
78 |
|
---|
79 | /*!
|
---|
80 | * \brief Set Auto Exposure
|
---|
81 | *
|
---|
82 | * Reimplemented from V4LCamera class
|
---|
83 | *
|
---|
84 | * \param value value
|
---|
85 | */
|
---|
86 | void SetAutoExposure(bool value);
|
---|
87 |
|
---|
88 | /*!
|
---|
89 | * \brief Set Brightness
|
---|
90 | *
|
---|
91 | * Reimplemented from V4LCamera class
|
---|
92 | *
|
---|
93 | * \param value value between 0 and 1
|
---|
94 | */
|
---|
95 | void SetBrightness(float value);
|
---|
96 |
|
---|
97 | /*!
|
---|
98 | * \brief Set Contrast
|
---|
99 | *
|
---|
100 | * Reimplemented from V4LCamera class
|
---|
101 | *
|
---|
102 | * \param value value between 0 and 1
|
---|
103 | */
|
---|
104 | void SetContrast(float value);
|
---|
105 |
|
---|
106 | /*!
|
---|
107 | * \brief Set Saturation
|
---|
108 | *
|
---|
109 | * Reimplemented from V4LCamera class
|
---|
110 | *
|
---|
111 | * \param value value between 0 and 1
|
---|
112 | */
|
---|
113 | void SetSaturation(float value);
|
---|
114 |
|
---|
115 | /*!
|
---|
116 | * \brief Set Hue
|
---|
117 | *
|
---|
118 | * Reimplemented from V4LCamera class
|
---|
119 | *
|
---|
120 | * \param value value between 0 and 1
|
---|
121 | */
|
---|
122 | void SetHue(float value);
|
---|
123 |
|
---|
124 |
|
---|
125 |
|
---|
126 | void mt9m114_detect(void);
|
---|
127 | void mt9m114_init(void);
|
---|
128 | int mt9m114_reset(void);
|
---|
129 | int mt9m114_errata_1(void);
|
---|
130 | int mt9m114_errata_2(void);
|
---|
131 | int mt9m114_PLL_settings(void);
|
---|
132 | int mt9m114_write_array(struct regval_list *vals);
|
---|
133 | int mt9m114_sensor_optimization(void);
|
---|
134 | int soc1040_read_reg(uint16_t reg, uint32_t *val,uint16_t data_length);
|
---|
135 | int soc1040_write_reg(uint16_t reg,uint32_t val, uint16_t data_length);
|
---|
136 | int check_uvc_status(const char* funcName);
|
---|
137 | int mt9m114_refresh(void);
|
---|
138 | int mt9m114_wait_num_frames(uint16_t numFrames);
|
---|
139 | int poll_command_register_bit(uint16_t bit_mask);
|
---|
140 | core::I2cPort* i2cport;
|
---|
141 | struct regval_list *wh_regval_list;
|
---|
142 | };
|
---|
143 | } // end namespace sensor
|
---|
144 | } // end namespace flair
|
---|
145 | #endif // PARROTCAMH_H
|
---|