Merge pull request #143 from Livox-SDK/master
merge from master
This commit was merged in pull request #143.
This commit is contained in:
@@ -233,5 +233,5 @@ Here is the example:
|
|||||||
# 5 Support
|
# 5 Support
|
||||||
|
|
||||||
You can get support from Livox with the following methods:
|
You can get support from Livox with the following methods:
|
||||||
* Send email to dev@livoxtech.com with a clear description of your problem and your setup
|
* Send email to cs@livoxtech.com with a clear description of your problem and your setup
|
||||||
* Github Issues
|
* Github Issues
|
||||||
|
|||||||
+1
-1
@@ -234,5 +234,5 @@ char broadcast_code_list[kMaxLidarCount][kBroadcastCodeSize] = {
|
|||||||
# 5 支持
|
# 5 支持
|
||||||
|
|
||||||
你可以通过以下方式获取 Livox 的技术支持 :
|
你可以通过以下方式获取 Livox 的技术支持 :
|
||||||
* 发送邮件到 dev@livoxtech.com 描述清楚问题和使用场景
|
* 发送邮件到 cs@livoxtech.com 描述清楚问题和使用场景
|
||||||
* Github Issues
|
* Github Issues
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ typedef struct {
|
|||||||
uint8_t month;
|
uint8_t month;
|
||||||
uint8_t day;
|
uint8_t day;
|
||||||
uint8_t hour;
|
uint8_t hour;
|
||||||
uint32_t mircrosecond;
|
uint32_t microsecond;
|
||||||
} LidarSetUtcSyncTimeRequest;
|
} LidarSetUtcSyncTimeRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -67,30 +67,43 @@ bool WakeUpPipe::PipeDestroy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool WakeUpPipe::PipeCreate() {
|
bool WakeUpPipe::PipeCreate() {
|
||||||
|
bool status = false;
|
||||||
//in filedes[0]
|
//in filedes[0]
|
||||||
//out filedes[1]
|
//out filedes[1]
|
||||||
int filedes[2];
|
int filedes[2]= {};
|
||||||
if (pipe(filedes) == -1) {
|
if (pipe(filedes) == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
do {
|
||||||
|
int flags = 0;
|
||||||
|
if ((flags = fcntl(filedes[0], F_GETFD)) == -1) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
int flags = 0;
|
flags |= FD_CLOEXEC;
|
||||||
if ((flags = fcntl(filedes[0], F_GETFL|O_NONBLOCK)) == -1) {
|
if (fcntl(filedes[0], F_SETFD, flags) == -1) {
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
flags |= FD_CLOEXEC;
|
flags = 0;
|
||||||
if (fcntl(filedes[0], F_SETFL, flags) == -1) {
|
if ((flags = fcntl(filedes[1], F_GETFD)) == -1) {
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = 0;
|
flags |= FD_CLOEXEC;
|
||||||
if ((flags = fcntl(filedes[1], F_GETFD)) == -1) {
|
if (fcntl(filedes[1], F_SETFD, flags) == -1) {
|
||||||
return false;
|
break;
|
||||||
}
|
}
|
||||||
|
status = true;
|
||||||
|
} while(0);
|
||||||
|
|
||||||
flags |= FD_CLOEXEC;
|
if (!status) {
|
||||||
if (fcntl(filedes[1], F_SETFD, flags) == -1) {
|
if (filedes[0] > 0) {
|
||||||
|
close(filedes[0]);
|
||||||
|
}
|
||||||
|
if (filedes[1] > 0) {
|
||||||
|
close(filedes[1]);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pipe_out_ = filedes[0];
|
pipe_out_ = filedes[0];
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ bool ParseRmcTime(const char* rmc, uint16_t rmc_len, LidarSetUtcSyncTimeRequest*
|
|||||||
}
|
}
|
||||||
|
|
||||||
utc_time_req->hour = hour;
|
utc_time_req->hour = hour;
|
||||||
utc_time_req->mircrosecond = (minute * 60 * 1000 + second * 1000) * 1000;
|
utc_time_req->microsecond = (minute * 60 * 1000 + second * 1000) * 1000;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user