diff --git a/README.md b/README.md index 1293306..1409cb7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README_CN.md b/README_CN.md index c040ea8..b8e30c1 100644 --- a/README_CN.md +++ b/README_CN.md @@ -234,5 +234,5 @@ char broadcast_code_list[kMaxLidarCount][kBroadcastCodeSize] = { # 5 支持 你可以通过以下方式获取 Livox 的技术支持 : -* 发送邮件到 dev@livoxtech.com 描述清楚问题和使用场景 +* 发送邮件到 cs@livoxtech.com 描述清楚问题和使用场景 * Github Issues diff --git a/sdk_core/include/livox_def.h b/sdk_core/include/livox_def.h index cd1582a..d627db3 100644 --- a/sdk_core/include/livox_def.h +++ b/sdk_core/include/livox_def.h @@ -643,7 +643,7 @@ typedef struct { uint8_t month; uint8_t day; uint8_t hour; - uint32_t mircrosecond; + uint32_t microsecond; } LidarSetUtcSyncTimeRequest; /** diff --git a/sdk_core/src/base/wake_up/unix/wake_up_pipe.cpp b/sdk_core/src/base/wake_up/unix/wake_up_pipe.cpp index 0e58c4c..b15e8e2 100644 --- a/sdk_core/src/base/wake_up/unix/wake_up_pipe.cpp +++ b/sdk_core/src/base/wake_up/unix/wake_up_pipe.cpp @@ -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]; diff --git a/sdk_core/src/command_handler/command_impl.cpp b/sdk_core/src/command_handler/command_impl.cpp index 486b4ae..77d6876 100644 --- a/sdk_core/src/command_handler/command_impl.cpp +++ b/sdk_core/src/command_handler/command_impl.cpp @@ -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; }