|
4 | 4 |
|
5 | 5 | # **Lens interface C++ library**
|
6 | 6 |
|
7 |
| -**v4.2.0** |
| 7 | +**v4.3.0** |
8 | 8 |
|
9 | 9 |
|
10 | 10 |
|
|
66 | 66 | | 4.0.3 | 01.07.2023 | - Documentation updated.<br />- Lens class comments in source code updated. |
|
67 | 67 | | 4.1.0 | 11.07.2023 | - Added LensParamsMask for lens params masking.<br />- encode(...) method of LensParams class updated.<br />- Documentation updated. |
|
68 | 68 | | 4.2.0 | 22.09.2023 | - Updated encode(...) and decode(...) methods of LensParams.<br />- Added decodeAndExecuteCommand(...) method.<br />- Added example of lens controller implementation. |
|
| 69 | +| 4.3.0 | 26.09.2023 | - Updated getParams methode. | |
69 | 70 |
|
70 | 71 |
|
71 | 72 |
|
@@ -135,7 +136,7 @@ public:
|
135 | 136 | virtual float getParam(LensParam id) = 0;
|
136 | 137 |
|
137 | 138 | /// Get the lens controller params.
|
138 |
| - virtual LensParams getParams() = 0; |
| 139 | + virtual void getParams(LensParams& params) = 0; |
139 | 140 |
|
140 | 141 | /// Execute command.
|
141 | 142 | virtual bool executeCommand(LensCommand id, float arg = 0) = 0;
|
@@ -182,7 +183,7 @@ std::cout << "Lens class version: " << Lens::getVersion() << std::endl;
|
182 | 183 | Console output:
|
183 | 184 |
|
184 | 185 | ```bash
|
185 |
| -Lens class version: 4.2.0 |
| 186 | +Lens class version: 4.3.0 |
186 | 187 | ```
|
187 | 188 |
|
188 | 189 |
|
@@ -291,10 +292,12 @@ virtual float getParam(LensParam id) = 0;
|
291 | 292 | **getParams(...)** method designed to obtain lens parameters. The particular implementation of the lens controller must provide thread-safe **getParams(...)** method call. This means that the **getParams(...)** method can be safely called from any thread. Method declaration:
|
292 | 293 |
|
293 | 294 | ```cpp
|
294 |
| -virtual LensParams getParams() = 0; |
| 295 | + virtual void getParams(LensParams& params) = 0; |
295 | 296 | ```
|
296 | 297 |
|
297 |
| -**Returns:** [**LensParams class**](#LensParams-class-description) class which contains all current lens params. |
| 298 | +| Parameter | Description | |
| 299 | +| --------- | ---------------------------------------------------------- | |
| 300 | +| params | Reference to LensParams object to store params. | |
298 | 301 |
|
299 | 302 |
|
300 | 303 |
|
@@ -352,7 +355,7 @@ static void encodeSetParamCommand(uint8_t* data, int& size, LensParam id, float
|
352 | 355 | | ---- | ----- | -------------------------------------------------- |
|
353 | 356 | | 0 | 0x01 | SET_PARAM command header value. |
|
354 | 357 | | 1 | 0x04 | Major version of Lens class. |
|
355 |
| -| 2 | 0x02 | Minor version of Lens class. | |
| 358 | +| 2 | 0x03 | Minor version of Lens class. | |
356 | 359 | | 3 | id | Parameter ID **int32_t** in Little-endian format. |
|
357 | 360 | | 4 | id | Parameter ID **int32_t** in Little-endian format. |
|
358 | 361 | | 5 | id | Parameter ID **int32_t** in Little-endian format. |
|
@@ -398,7 +401,7 @@ static void encodeCommand(uint8_t* data, int& size, LensCommand id, float arg =
|
398 | 401 | | ---- | ----- | --------------------------------------------------------- |
|
399 | 402 | | 0 | 0x00 | SET_PARAM command header value. |
|
400 | 403 | | 1 | 0x04 | Major version of Lens class. |
|
401 |
| -| 2 | 0x02 | Minor version of Lens class. | |
| 404 | +| 2 | 0x03 | Minor version of Lens class. | |
402 | 405 | | 3 | id | Command ID **int32_t** in Little-endian format. |
|
403 | 406 | | 4 | id | Command ID **int32_t** in Little-endian format. |
|
404 | 407 | | 5 | id | Command ID **int32_t** in Little-endian format. |
|
|
0 commit comments