统一跨平台时间函数接口。

This commit is contained in:
xinyang
2019-07-31 14:51:01 +08:00
parent 01882b97c6
commit 98bc5ef95b
23 changed files with 87 additions and 95 deletions

View File

@@ -1,20 +1,20 @@
//
// Created by xixiliadorabarry on 1/24/19.
//
#ifndef CONSTANT_H
#define CONSTANT_H
#include "additions/additions.h"
const int BIG = 1;
const int SMALL = 0;
const int SRC_WIDTH = 320;
const int SRC_HEIGHT = 240;
const int CLOCKWISE = 1;
const int ANTICLOCKWISE = -1;
//const float ATTACK_DISTANCE = 718.0;//cm
const float ATTACK_DISTANCE = 750.0;//cm
const double ARMOR_CENTER_TO_CYCLE_CENTER = 75.0;//cm
#endif //CONSTANT_H
//
// Created by xixiliadorabarry on 1/24/19.
//
#ifndef CONSTANT_H
#define CONSTANT_H
#include "additions.h"
const int BIG = 1;
const int SMALL = 0;
const int SRC_WIDTH = 320;
const int SRC_HEIGHT = 240;
const int CLOCKWISE = 1;
const int ANTICLOCKWISE = -1;
//const float ATTACK_DISTANCE = 718.0;//cm
const float ATTACK_DISTANCE = 750.0;//cm
const double ARMOR_CENTER_TO_CYCLE_CENTER = 75.0;//cm
#endif //CONSTANT_H

View File

@@ -13,12 +13,12 @@
#include <constants.h>
#include <stdio.h>
#include <time.h>
#include <sys/timeb.h>
#include <systime.h>
#include "energy/constant.h"
#include "energy/param_struct_define.h"
#include "serial/serial.h"
#include "additions/additions.h"
#include "options/options.h"
#include "serial.h"
#include "additions.h"
#include "options.h"
using std::vector;
@@ -87,7 +87,7 @@ private:
float shoot;//若为2则要求主控板发弹
float sum_yaw, sum_pitch;//yaw和pitch的累计误差即PID中积分项
timeval time_start_guess;
systime time_start_guess;
cv::RotatedRect centerR;//风车中心字母R的可能候选区
cv::RotatedRect flow_strip;//图像中所有流动条(理论上只有一个)