This commit is contained in:
xinyang
2019-08-03 22:49:46 +08:00
parent ef32b54761
commit b67ef4b475
2 changed files with 2 additions and 1 deletions

View File

@@ -44,7 +44,7 @@ static bool sendTarget(Serial &serial, double x, double y, double z, uint16_t sh
bool ArmorFinder::sendBoxPosition(uint16_t shoot_delay) {
if (target_box.rect == cv::Rect2d()) return false;
if (shoot_delay) {
LOGM(STR_CTR(WORD_BLUE, "shoot after %dms"), shoot_delay);
LOGM(STR_CTR(WORD_BLUE, "next box %dms"), shoot_delay);
}
auto rect = target_box.rect;
double dx = rect.x + rect.width / 2 - IMAGE_CENTER_X;

View File

@@ -62,5 +62,6 @@ bool ArmorFinder::stateTrackingTarget(cv::Mat &src) {
target_box.rect = pos;
target_box.light_blobs.clear();
}
last_box = target_box;
return true;
}