SPQR-Team-2019-REVAMPED/include/sensors/data_source_camera_conicmir...

32 lines
911 B
C
Raw Normal View History

2019-11-18 18:11:26 +01:00
#pragma once
#include "behaviour_control/data_source.h"
2020-01-20 18:57:14 +01:00
#define startp 105
#define endp 115
#define unkn 116
2020-01-27 17:05:39 +01:00
//Coords are mapped from 0 up to this value
#define MAP_MAX 100
#define HALF_MAP_MAX 50
//Imu To Camera Angle Mult
#define IMUTOC_AMULT 1
2019-11-18 17:15:32 +01:00
class DataSourceCameraConic : public DataSource{
2019-11-18 17:15:32 +01:00
public:
DataSourceCameraConic(HardwareSerial* ser, int baud);
2019-11-18 17:15:32 +01:00
void test() override;
2019-11-18 18:11:26 +01:00
void readSensor() override;
// int getValueAtk(bool);
// int getValueDef(bool);
2020-01-20 18:43:51 +01:00
int yAngle, bAngle, yAngleFix, bAngleFix, yDist, bDist;
2020-01-20 18:43:51 +01:00
int count = 0, unkn_counter;
2020-03-02 18:48:29 +01:00
int xb, yb, xy, yy, true_xb, true_xy, true_yb, true_yy, calc_xb, calc_yb, calc_xy, calc_yy, true_xb_fixed,
true_xy_fixed, true_yb_fixed, true_yy_fixed;
2020-01-20 18:43:51 +01:00
bool data_received = false, start = false, end = false;
2020-01-27 17:05:39 +01:00
int goalOrientation, pAtk, pDef;
2020-01-22 16:55:55 +01:00
int value;
2019-11-18 17:15:32 +01:00
};