[A]Add sdk version
[B]Fix bug in README file
This commit is contained in:
@@ -89,8 +89,19 @@ typedef enum {
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#define LIVOX_SDK_MAJOR_VERSION 1
|
||||
#define LIVOX_SDK_MINOR_VERSION 0
|
||||
#define LIVOX_SDK_PATCH_VERSION 0
|
||||
|
||||
#define kBroadcastCodeSize 16
|
||||
|
||||
/** The numeric version information struct. */
|
||||
typedef struct {
|
||||
int major; /**< major number */
|
||||
int minor; /**< minor number */
|
||||
int patch; /**< patch number */
|
||||
} LivoxSdkVersion;
|
||||
|
||||
/** Cartesian coordinate format. */
|
||||
typedef struct {
|
||||
int32_t x; /**< X axis, Unit:mm */
|
||||
@@ -99,7 +110,7 @@ typedef struct {
|
||||
uint8_t reflectivity; /**< Reflectivity */
|
||||
} LivoxRawPoint;
|
||||
|
||||
/** standard point cloud format */
|
||||
/** Standard point cloud format */
|
||||
typedef struct {
|
||||
float x; /**< X axis, Unit:m */
|
||||
float y; /**< X axis, Unit:m */
|
||||
|
||||
@@ -33,6 +33,12 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include "livox_def.h"
|
||||
|
||||
/**
|
||||
* Return SDK's version information in a numeric form.
|
||||
* @param version Pointer to a version structure for returning the version information.
|
||||
*/
|
||||
void GetLivoxSdkVersion(LivoxSdkVersion *version);
|
||||
|
||||
/**
|
||||
* Initialize the SDK.
|
||||
* @return true if successfully initialized, otherwise false.
|
||||
|
||||
@@ -78,7 +78,7 @@ bool FindLocalIP(const struct sockaddr_in &client_addr, uint32_t &local_ip) {
|
||||
|
||||
IP_ADAPTER_INFO *pAdapter = reinterpret_cast<IP_ADAPTER_INFO *>(pAdapterInfo.get());
|
||||
if (NO_ERROR == dlRetVal && pAdapter != NULL) {
|
||||
while (pAdapterInfo) {
|
||||
while (pAdapter) {
|
||||
std::string str_ip = pAdapter->IpAddressList.IpAddress.String;
|
||||
std::string str_mask = pAdapter->IpAddressList.IpMask.String;
|
||||
ULONG host_ip = inet_addr(const_cast<char *>(str_ip.c_str()));
|
||||
|
||||
@@ -30,6 +30,14 @@
|
||||
using namespace livox;
|
||||
IOThread *g_thread = NULL;
|
||||
|
||||
void GetLivoxSdkVersion(LivoxSdkVersion *version) {
|
||||
if (version != NULL) {
|
||||
version->major = LIVOX_SDK_MAJOR_VERSION;
|
||||
version->minor = LIVOX_SDK_MINOR_VERSION;
|
||||
version->patch = LIVOX_SDK_PATCH_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
bool Init() {
|
||||
bool result = false;
|
||||
do {
|
||||
@@ -59,7 +67,6 @@ bool Init() {
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
||||
result = true;
|
||||
} while (0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user