merge from master #143
@@ -233,5 +233,5 @@ Here is the example:
|
||||
# 5 Support
|
||||
|
||||
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
|
||||
|
||||
+1
-1
@@ -234,5 +234,5 @@ char broadcast_code_list[kMaxLidarCount][kBroadcastCodeSize] = {
|
||||
# 5 支持
|
||||
|
||||
你可以通过以下方式获取 Livox 的技术支持 :
|
||||
* 发送邮件到 dev@livoxtech.com 描述清楚问题和使用场景
|
||||
* 发送邮件到 cs@livoxtech.com 描述清楚问题和使用场景
|
||||
* Github Issues
|
||||
|
||||
@@ -643,7 +643,7 @@ typedef struct {
|
||||
uint8_t month;
|
||||
uint8_t day;
|
||||
uint8_t hour;
|
||||
uint32_t mircrosecond;
|
||||
uint32_t microsecond;
|
||||
} LidarSetUtcSyncTimeRequest;
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,30 +67,43 @@ bool WakeUpPipe::PipeDestroy() {
|
||||
}
|
||||
|
||||
bool WakeUpPipe::PipeCreate() {
|
||||
bool status = false;
|
||||
//in filedes[0]
|
||||
//out filedes[1]
|
||||
int filedes[2];
|
||||
int filedes[2]= {};
|
||||
if (pipe(filedes) == -1) {
|
||||
return false;
|
||||
}
|
||||
do {
|
||||
int flags = 0;
|
||||
if ((flags = fcntl(filedes[0], F_GETFD)) == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
int flags = 0;
|
||||
if ((flags = fcntl(filedes[0], F_GETFL|O_NONBLOCK)) == -1) {
|
||||
return false;
|
||||
}
|
||||
flags |= FD_CLOEXEC;
|
||||
if (fcntl(filedes[0], F_SETFD, flags) == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
flags |= FD_CLOEXEC;
|
||||
if (fcntl(filedes[0], F_SETFL, flags) == -1) {
|
||||
return false;
|
||||
}
|
||||
flags = 0;
|
||||
if ((flags = fcntl(filedes[1], F_GETFD)) == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
flags = 0;
|
||||
if ((flags = fcntl(filedes[1], F_GETFD)) == -1) {
|
||||
return false;
|
||||
}
|
||||
flags |= FD_CLOEXEC;
|
||||
if (fcntl(filedes[1], F_SETFD, flags) == -1) {
|
||||
break;
|
||||
}
|
||||
status = true;
|
||||
} while(0);
|
||||
|
||||
flags |= FD_CLOEXEC;
|
||||
if (fcntl(filedes[1], F_SETFD, flags) == -1) {
|
||||
if (!status) {
|
||||
if (filedes[0] > 0) {
|
||||
close(filedes[0]);
|
||||
}
|
||||
if (filedes[1] > 0) {
|
||||
close(filedes[1]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
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->mircrosecond = (minute * 60 * 1000 + second * 1000) * 1000;
|
||||
utc_time_req->microsecond = (minute * 60 * 1000 + second * 1000) * 1000;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user