diff --git a/armor/include/armor_finder/armor_finder.h b/armor/include/armor_finder/armor_finder.h index df4940b..0c30e45 100644 --- a/armor/include/armor_finder/armor_finder.h +++ b/armor/include/armor_finder/armor_finder.h @@ -109,9 +109,6 @@ private: const uint8_t &enemy_color; // 敌方颜色,引用外部变量,自动变化 const uint8_t &is_anti_top; // 进入反陀螺,引用外部变量,自动变化 State state; // 自瞄状态对象实例 - ArmorBox target_box, last_box; // 目标装甲板 - cv::Point2f target_area_center; // 目标大框像素中心 - double z_min_filtered = 0; // 目标深度极小值 ArmorBoxes current_target_boxes; // 聚类后的同一车体装甲板 int anti_switch_cnt; // 防止乱切目标计数器 cv::Ptr tracker; // tracker对象实例 @@ -145,6 +142,10 @@ private: bool sendBoxPosition(uint16_t shoot_delay); // 发送装甲板位置 bool shouldFire() const { return can_fire; } // 获取开火建议 public: + ArmorBox target_box, last_box; // 目标装甲板 + cv::Point2f target_area_center; // 目标大框像素中心 + double z_min_filtered = 0; // 目标深度极小值 + void run(cv::Mat &src); // 自瞄主函数 struct HistoryItem { cv::Point3f pos; diff --git a/others/include/config/setconfig.h b/others/include/config/setconfig.h index 7264e94..afc4698 100644 --- a/others/include/config/setconfig.h +++ b/others/include/config/setconfig.h @@ -4,7 +4,9 @@ #ifndef _SETCONFIG_H_ #define _SETCONFIG_H_ +#ifndef WITH_CONFIG #define WITH_CONFIG +#endif #ifdef WITH_CONFIG #include