SPQR-Team1-2020/include/data_source_camera_conicmir...

27 lines
773 B
C
Raw Normal View History

2019-11-18 18:11:26 +01:00
#pragma once
2020-01-20 18:57:14 +01:00
#define startp 105
#define endp 115
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
2020-01-20 18:57:14 +01:00
//#define unkn 0b01101001
2019-11-18 17:15:32 +01:00
#include "data_source.h"
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;
int xb, yb, xy, yy, true_xb, true_xy, true_yb, true_yy, calc_xb, calc_yb, calc_xy, calc_yy;
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
};