去除 XMake

This commit is contained in:
2026-03-16 14:47:30 +08:00
parent 15be04d1f7
commit a133dea09a
7 changed files with 368 additions and 375 deletions

View File

@@ -24,7 +24,7 @@ IF(CCACHE_FOUND)
ENDIF() ENDIF()
FIND_PACKAGE(Eigen3 REQUIRED) FIND_PACKAGE(Eigen3 REQUIRED)
FIND_PACKAGE(OpenCV 3 REQUIRED) FIND_PACKAGE(OpenCV 4 REQUIRED)
FIND_PACKAGE(Threads) FIND_PACKAGE(Threads)
LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/others) LINK_DIRECTORIES(${PROJECT_SOURCE_DIR}/others)

View File

@@ -20,8 +20,8 @@
#define BOX_RED ENEMY_RED #define BOX_RED ENEMY_RED
#define BOX_BLUE ENEMY_BLUE #define BOX_BLUE ENEMY_BLUE
#define IMAGE_CENTER_X (320) #define IMAGE_CENTER_X (640)
#define IMAGE_CENTER_Y (240-20) #define IMAGE_CENTER_Y (512-20)
#define DISTANCE_HEIGHT_5MM (10700.0) // 单位: cm*pixel #define DISTANCE_HEIGHT_5MM (10700.0) // 单位: cm*pixel
#define DISTANCE_HEIGHT DISTANCE_HEIGHT_5MM #define DISTANCE_HEIGHT DISTANCE_HEIGHT_5MM

View File

@@ -5,17 +5,17 @@ resolution :
image_size : image_size :
{ {
iIndex = 1; iIndex = 1;
acDescription = "640X480 ROI"; acDescription = "1280X1024 ROI";
uBinSumMode = 0; uBinSumMode = 0;
uBinAverageMode = 0; uBinAverageMode = 0;
uSkipMode = 0; uSkipMode = 0;
uResampleMask = 0; uResampleMask = 0;
iHOffsetFOV = 56; iHOffsetFOV = 56;
iVOffsetFOV = 0; iVOffsetFOV = 0;
iWidthFOV = 640; iWidthFOV = 1280;
iHeightFOV = 480; iHeightFOV = 1024;
iWidth = 640; iWidth = 1280;
iHeight = 480; iHeight = 1024;
iWidthZoomHd = 0; iWidthZoomHd = 0;
iHeightZoomHd = 0; iHeightZoomHd = 0;
iWidthZoomSw = 0; iWidthZoomSw = 0;

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,7 @@
#ifndef _SETCONFIG_H_ #ifndef _SETCONFIG_H_
#define _SETCONFIG_H_ #define _SETCONFIG_H_
#define WITH_CONFIG
#ifdef WITH_CONFIG #ifdef WITH_CONFIG
#include <config/config.h> #include <config/config.h>

View File

@@ -181,7 +181,7 @@ bool Serial::ReadData(unsigned char *buffer, unsigned int length) {
using namespace std; using namespace std;
string get_uart_dev_name() { string get_uart_dev_name() {
FILE *ls = popen("ls /dev/ttyUSB* --color=never", "r"); FILE *ls = popen("ls /dev/ttyCH341USB* --color=never", "r");
char name[20] = {0}; char name[20] = {0};
fscanf(ls, "%s", name); fscanf(ls, "%s", name);
return name; return name;

View File

@@ -22,25 +22,15 @@ end
-- 添加依赖 -- 添加依赖
add_requires("eigen", {system = false}) add_requires("eigen", {system = false})
add_requires("pthread") add_requires("pthread", {system = true})
add_requires("ffmpeg", {
--- OpenCV 4.6.0 配置(启用 ffmpeg 和 contrib
add_requires("opencv", {
system = false, system = false,
configs = { configs = {
ffmpeg = false, iconv = true
eigen = true,
png = true,
jpeg = true,
webp = false,
tiff = false,
quirc = false,
opengl = false,
protobuf = false,
bundled = true,
gtk = true
} }
}) })
add_requires("glib")
add_requires("gdk-pixbuf", {system = false})
-- 目标配置 -- 目标配置
target("run") target("run")
@@ -66,12 +56,14 @@ target("run")
add_includedirs("armor/include/armor_finder") add_includedirs("armor/include/armor_finder")
add_includedirs("armor/include/armor_finder/classifier") add_includedirs("armor/include/armor_finder/classifier")
add_includedirs("armor/include/show_images") add_includedirs("armor/include/show_images")
add_includedirs("/usr/local/include/opencv4")
-- 添加依赖包 -- 添加依赖包
add_packages("pthread", "eigen", "opencv") add_packages("pthread", "eigen", "opencv", "ffmpeg")
-- 添加链接目录 -- 添加链接目录
add_linkdirs("others") add_linkdirs("others")
add_links("opencv")
-- 根据平台链接相机 SDK -- 根据平台链接相机 SDK
if is_plat("linux") then if is_plat("linux") then