SPQR-Team-2019-REVAMPED/include/data_source_camera.h

33 lines
949 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
//#define unkn 0b01101001
2019-11-18 17:15:32 +01:00
#include "data_source.h"
class DataSourceCamera : public DataSource{
public:
DataSourceCamera(HardwareSerial* ser, int baud);
void postProcess() override;
void test() override;
2019-11-18 18:11:26 +01:00
int fixCamIMU(int);
void readSensor() override;
int getValueAtk(bool);
int getValueDef(bool);
2020-01-20 18:43:51 +01:00
int count = 0, unkn_counter;
byte xb, yb, xy, yy, true_xb, true_xy, true_yb, true_yy;
bool data_received = false, start = false, end = false;
2019-11-18 17:15:32 +01:00
int goalOrientation, pAtk, pDef, imuOff, portx, valX, valY, valB, oldGoalX, oldGoalY, oldGoalB;
2019-11-18 18:11:26 +01:00
int cameraReady;
2019-11-18 17:15:32 +01:00
char value;
int startpY = 0;
int startpB = 0;
int endpY = 0;
int endpB = 0;
int datavalid = 0;
String valStringY = "";
String valStringB = "";
2020-01-20 18:43:51 +01:00
bool negateB, negateY;
2019-11-18 17:15:32 +01:00
};