This commit is contained in:
wanpiqiu123
2019-07-22 09:35:22 +08:00
parent bec5fb5683
commit 0082c365fb
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,8 @@
// //
#include <armor_finder/armor_finder.h> #include <armor_finder/armor_finder.h>
#include<log.h> #include <config/setconfig.h>
#include <log.h>
static bool sendTarget(Serial &serial, double x, double y, double z, uint16_t shoot_delay) { static bool sendTarget(Serial &serial, double x, double y, double z, uint16_t shoot_delay) {
static short x_tmp, y_tmp, z_tmp; static short x_tmp, y_tmp, z_tmp;
@@ -41,8 +42,8 @@ static bool sendTarget(Serial &serial, double x, double y, double z, uint16_t sh
} }
bool ArmorFinder::sendBoxPosition(uint16_t shoot_delay) { bool ArmorFinder::sendBoxPosition(uint16_t shoot_delay) {
if(armor_box.rect == cv::Rect2d()) return false; if (armor_box.rect == cv::Rect2d()) return false;
if(shoot_delay){ if (shoot_delay) {
LOGM(STR_CTR(WORD_BLUE, "shoot after %dms"), shoot_delay); LOGM(STR_CTR(WORD_BLUE, "shoot after %dms"), shoot_delay);
} }
auto rect = armor_box.rect; auto rect = armor_box.rect;

View File

@@ -3,6 +3,7 @@
// //
#include "energy/energy.h" #include "energy/energy.h"
#include <iostream> #include <iostream>
#include <config/setconfig.h>
#include "log.h" #include "log.h"
using namespace std; using namespace std;