feat:add wite/read configuration parameters command

Livox-SDK
2020-06-18 15:27:09 +08:00
parent aaaaca188f
commit 5249fe7da5
5 changed files with 105 additions and 4 deletions
+105 -4
@@ -3,6 +3,7 @@
| **Document Release History** | | |
| ---------------------------- | ----------- | ------------------------------------------------------------ |
| **Date** | **Release** | **Change Description** |
| 2020/06/10 | v1.2.0 | 1. add write/read configuration parameters commands |
| 2019/10/22 | v1.1.1 | 1. Update status code, add time synchronization status (Horizon: v06.05.00.00+, Mid-40/Mid-100: v03.07.00.00+) <br>2. Change IMU data push frequency |
| 2019/9/25 | v1.1.0 | 1. Add Tele-15 / Horizon LiDAR's support |
| 2019/7/08 | v1.0.6 | 1. Fix crc32 bits error <br>2. Add system status code description |
@@ -102,6 +103,8 @@ There are three kinds of CMD sets:
| | 0x08 | Configure Static/Dynamic IP |
| | 0x09 | Get Device IP Information |
| | 0x0A | Reboot device |
| | 0x0B | write configuration parameters |
| | 0x0C | read configuration parameters |
| 0x01 LiDAR Command Set | 0x00 | Set Mode |
| | 0x01 | Write LiDAR Extrinsic Parameters |
| | 0x02 | Read LiDAR Extrinsic Parameters |
@@ -398,8 +401,33 @@ Hub Status Code consists of 32 bits, which has the following meanings:
| Bit7:29 | RSVD | |
| Bit30:31 | system_status | 0: Normal <br>1: Warning <br>Any of the following situations will trigger warning:<br> 1.1 `temp_status` is 1;<br>2: Error <br>Any of the following situations will trigger error: <br> 2.1 `temp_status` is 2;<br> 2.2 `LiDAR_status` is 1;<br> 2.3 `firmware_status` is 1; |
# 4 Control Command Detail
## 4.1 General CMD Set
# 4 Configuration Parameters
## 4.1 Description
The configuration parameter table is designed to configure the Livox device more easily. It is stored in the non-volatile area of the device. So configuration parameters will not lose after reboot.
Each configuration has an independent key. The following are all available configuration parameters:
| Key | Name | Supported Device | Description |
|------|------|------------------|-----------------------|
| 0x00 | Reserved | -- | Invalid key |
| 0x01 | High Sensitivity Function | Tele-15/07.09.0000+ | High Sensitivity Function enable/disable |
* See [Write Configuration Parameters](#write-configuration-parameters) for writing configuration parameters;
* See [Read Configuration Parameters](#read-configuration-parameters) for reading configuration parameters;
## 4.2 Value Details
### 0x01 High Sensitivity Mode
**Value Length:** 1
**Supported Device:** <br>Tele-15/07.09.0000+ <br>
| name | Offset (byte) | Data Type | Description | Default Value |
|---------|---------------|-----------|-----------------------|-----------------------|
| enable | 0 | uint8_t | 0: High Sensitivity Function Disable <br>1: High Sensitivity Function Enable | 1 |
# 5 Control Command Detail
## 5.1 General CMD Set
### 0x00 Broadcast Message
message
@@ -612,8 +640,81 @@ response
| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
| | ret_code | 2 | uint8_t | Return Code: <br>0x00: Success <br>0x01: Fail |
### 0x0B Write Configuration Parameters
**Supported devices/firmware version:** <br>Livox Hub/08.09.0000+ <br>Horizon/06.11.0000+ <br>Tele-15/07.09.0000+<br>
## 4.2 LiDAR CMD Set
request
| CMD | Name | Offset (byte) | Data Type | Description |
|------|---------|---------------|-----------|-----------------------|
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
| | param_list | 2 | -- | Configuration Parameters in the form of Key-Value pairs. See the following part |
In 'param_list', each of the configuration parameter has the following format:
#### Configuration Parameter List Format
| Field | Offset (byte) | Data Type | Description |
|--------|---------------|-----------|-------------|
| key | 0 | uint16_t | Key|
| length | 2 | uint16_t | Length of value |
| value | 4 | -- | The type varies with different keys. For details, see [Value Details](#value-details) |
response
| ACK | Name | Offset (byte) | Data Type | Description |
|------|----------|---------------|------------|---------------------|
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
| | ret_code | 2 | uint8_t | Return Code: <br>0x00: Success <br>0x01: Fail, an error occurred while writing a parameter |
| | error_key | 3 | uint16_t | The Key of the first error Configuration Parameter|
| | error_code | 5 | uint8_t | See the following part |
The meaning of the 'error_code':
#### Configuration Parameter Error Code
| Error Code | Description |
| ---------- | --------- - |
| 0 | No Error |
| 1 | The key is not supported|
| 2 | Execution failed|
| 3 | The key cannot be written |
| 4 | Wrong value |
| 5 | Wrong value length |
| 6 | Reading parameter length limit |
| 7 | The number of parameters does not match |
### 0x0C Read Configuration Parameters
**Supported devices/firmware version:** <br>Livox Hub/08.09.0000+ <br>Horizon/06.11.0000+ <br>Tele-15/07.09.0000+<br>
request
| CMD | Name | Offset (byte) | Data Type | Description |
|------|---------|---------------|-----------|-----------------------|
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
| | param_num | 2 | uint8_t | The number of parameters |
| | key_list | 3 | -- | Keys List to read |
In 'key_list', each of the key has the following format:
| Field | Offset (byte) | Data Type | Description |
|--------|---------------|-----------|-------------|
| key | 0 | uint16_t | Key|
response
| ACK | Name | Offset (byte) | Data Type | Description |
|------|----------|---------------|------------|---------------------|
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
| | ret_code | 2 | uint8_t | Return Code: <br>0x00: Success <br>0x01: Fail, an error occurred while writing a parameter |
| | error_key | 3 | uint16_t | The Key of the first error Configuration Parameter|
| | error_code | 5 | uint8_t | For details, see [Configuration Parameter Error Code](#configuration-parameter-error-code) |
| | param_list | 6 | -- | Configuration Parameters in the form of Key-Value pairs, see [Configuration Parameter List Format](#configuration-parameter-list-format)|
## 5.2 LiDAR CMD Set
### 0x00 Set Mode
@@ -832,7 +933,7 @@ response
| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
| | ret_code | 2 | uint8_t | Return Code: <br>0x00: Success <br>0x01: Fail |
## 4.3 Hub CMD SET
## 5.3 Hub CMD SET
### 0x00 Query Connected LiDAR Device
request
BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB