From 0f77d5362b3e4540c02994e332edfc7e1df753bc Mon Sep 17 00:00:00 2001 From: dishierweidu <835317255@qq.com> Date: Mon, 23 May 2022 14:32:59 +0800 Subject: [PATCH] mode change bug fix --- buff/detector/inference.cpp | 2 +- debug.h | 8 ++++---- thread/thread.cpp | 11 ++++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/buff/detector/inference.cpp b/buff/detector/inference.cpp index c05a0f3..5aea6f5 100644 --- a/buff/detector/inference.cpp +++ b/buff/detector/inference.cpp @@ -320,7 +320,7 @@ BuffDetector::~BuffDetector() //TODO:change to your dir bool BuffDetector::initModel(string path) { - ie.SetConfig({{CONFIG_KEY(CACHE_DIR), "/home/dishierweidu/Desktop/TUP-InfantryVision-2022-main/.cache"}}); + ie.SetConfig({{CONFIG_KEY(CACHE_DIR), "../TUP-InfantryVision-2022-main/.cache"}}); // ie.SetConfig({{CONFIG_KEY(GPU_THROUGHPUT_STREAMS),"GPU_THROUGHPUT_AUTO"}}); ie.SetConfig({{CONFIG_KEY(GPU_THROUGHPUT_STREAMS),"1"}}); // Step 1. Read a model in OpenVINO Intermediate Representation (.xml and diff --git a/debug.h b/debug.h index 666927a..33e2946 100644 --- a/debug.h +++ b/debug.h @@ -79,10 +79,6 @@ #define USING_IMU_C_BOARD //使用C板陀螺仪 #endif // USING_IMU -#ifndef DETECT_RED - #define DETECT_BLUE -#endif //DETECT_RED - #ifdef SHOW_IMG #define SHOW_ALL_ARMOR //是否绘制装甲板 #define SHOW_ALL_FANS //是否绘制所有扇叶 @@ -95,6 +91,10 @@ #define USING_USB_CAMERA #endif // USING_DAHENG +#ifndef DETECT_RED + #define DETECT_BLUE +#endif //DETECT_RED + #ifdef DETECT_RED #define DETECT_BUFF_BLUE #else diff --git a/thread/thread.cpp b/thread/thread.cpp index 3350fc8..4908795 100644 --- a/thread/thread.cpp +++ b/thread/thread.cpp @@ -157,10 +157,12 @@ bool consumer(Factory &task_factory,Factory &transmit_fact VisionData data; task_factory.consume(dst); mode = dst.mode; - mode = 1; //默认进入自瞄模式 + +#ifdef DEBUG_WITHOUT_COM + mode = 1; +#endif //DEBUG_WITHOUT_COM #ifdef SAVE_TRANSMIT_LOG - // cout< &receive_factory, s auto timestamp = (int)(std::chrono::duration(time_cap - time_start).count()); // cout<<"Quat: "<