清理编码器+死代码+可读性整理: 删除ENCODER类(含UB析构), MotorController简化为PWM+GPIO裸控制器, 移除mortor_kp/ki/kd全局变量, 排除vl53l0x/zebra_detect死代码, 修复image_cv行列写反, 清理无关include
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
+14
-29
@@ -6,45 +6,30 @@ cmake_minimum_required(VERSION 3.5.0)
|
||||
|
||||
# 设置 C++ 标准
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread -Wall -march=loongarch64 -mtune=loongarch64 -ffast-math -funroll-loops -fomit-frame-pointer") # 对于 C++ 编译器
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall") # 对于 C 编译器
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread -Wall -march=loongarch64 -mtune=loongarch64 -ffast-math -funroll-loops -fomit-frame-pointer")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall")
|
||||
|
||||
# 定义项目名称和版本,并指定使用C和C++语言
|
||||
# 定义项目名称和版本
|
||||
project(smartcar_demo2 VERSION 0.1.0 LANGUAGES C CXX)
|
||||
|
||||
# 设置OpenCV的安装路径
|
||||
# OpenCV 设备端路径
|
||||
set(OpenCV_DIR /mnt/d/PPPProgram/smartcar/opencv_device/lib/cmake/opencv4)
|
||||
|
||||
# 查找OpenCV库,确保安装了所需的依赖
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
# 包含OpenCV的头文件路径
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
include_directories(src)
|
||||
message(STATUS "OpenCV Include Directories: ${OpenCV_INCLUDE_DIRS}")
|
||||
|
||||
# 包含项目的自定义库路径
|
||||
# 项目头文件路径
|
||||
include_directories(src)
|
||||
include_directories(lib)
|
||||
|
||||
# 查找源文件所在的目录
|
||||
# 收集 src 下所有 .cpp (自动发现)
|
||||
aux_source_directory(src DIR_SRCS)
|
||||
|
||||
# 将 src 目录下的源文件编译为静态库
|
||||
add_library(common_lib STATIC ${DIR_SRCS})
|
||||
# 排除暂不使用的模块(源文件保留)
|
||||
# vl53l0x.cpp — 激光测距, 硬件未接
|
||||
# zebra_detect.cpp — 经典斑马线检测, 已由 nanodet 模型替代
|
||||
list(FILTER DIR_SRCS EXCLUDE REGEX "(vl53l0x\\.cpp|zebra_detect\\.cpp)")
|
||||
|
||||
# 添加子目录
|
||||
add_subdirectory(main) # 主程序
|
||||
add_subdirectory(demo1) # demo1
|
||||
add_subdirectory(framebuffer_demo)
|
||||
add_subdirectory(opencv_demo1)
|
||||
add_subdirectory(opencv_demo2)
|
||||
add_subdirectory(opencv_demo3)
|
||||
add_subdirectory(encoder_demo)
|
||||
add_subdirectory(jy62_demo)
|
||||
add_subdirectory(key_demo)
|
||||
add_subdirectory(wonderEcho_demo)
|
||||
add_subdirectory(udp_receive)
|
||||
add_subdirectory(image_test)
|
||||
# add_subdirectory(zebra_demo)
|
||||
add_subdirectory(gd13_demo)
|
||||
add_subdirectory(screenshot_demo)
|
||||
# 静态库 + 主程序
|
||||
add_library(common_lib STATIC ${DIR_SRCS})
|
||||
add_subdirectory(main)
|
||||
|
||||
Reference in New Issue
Block a user