Refactor lidar library: rename olei_config to lidar_config, add nanoscan example and shared byte helpers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 09:27:43 +07:00
parent 59880871b0
commit 323715eab0
16 changed files with 621 additions and 814 deletions

View File

@@ -11,12 +11,10 @@ find_package(Threads REQUIRED)
option(BUILD_SHARED_LIBS "Build shared (.so) libraries instead of static" ON)
# ── lidarlib: OLEI (UDP) + SICK (TCP) drivers, the unified make_lidar()
# factory, and config.json load/save. No web UI. ──
set(LIDARLIB_SOURCES
src/olei_lidar.cpp
src/sick_lidar.cpp
src/olei_config.cpp
src/lidar_config.cpp
)
add_library(lidarlib ${LIDARLIB_SOURCES})
@@ -42,13 +40,14 @@ if(LIDARLIB_BUILD_EXAMPLES)
add_executable(sick_example examples/sick_example.cpp)
target_link_libraries(sick_example PRIVATE lidarlib)
# Headless skeleton app: load config.json -> make_lidar() each -> print scans.
# Replace its print loop with your own GUI; this is the integration template.
add_executable(nanoscan_example examples/nanoscan_example.cpp)
target_link_libraries(nanoscan_example PRIVATE lidarlib)
add_executable(lidar_app examples/lidar_app.cpp)
target_link_libraries(lidar_app PRIVATE lidarlib)
endif()
# ── install + find_package() support ──
# install + find_package() support
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)