Skip to content

Commit

Permalink
修改GS点云缓存由N组改为1组
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanyiaini committed Nov 22, 2024
1 parent c8faaca commit 78f9528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
#MSVC compiler
add_compile_options("/utf-8")
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX)
ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
#MinGW compiler
ENDIF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
Expand Down
4 changes: 2 additions & 2 deletions src/GSLidarDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ result_t GSLidarDriver::grabScanData(
if (datas.size())
{
//从数组中取出点云数据
gs_module_nodes ns = datas.front();
datas.pop_front();
gs_module_nodes ns = datas.back();
datas.clear();
size_t size = min(int(count), ns.pointCount);
memcpy(nodes, ns.points, size * SDKNODESIZE);
count = size;
Expand Down

0 comments on commit 78f9528

Please sign in to comment.