SPQR-Team-2019-REVAMPED/include/sensors/data_source_ball.h

22 lines
532 B
C
Raw Permalink Normal View History

2019-11-18 18:11:26 +01:00
#pragma once
#include "behaviour_control/data_source.h"
2021-05-07 21:39:03 +02:00
#include <Arduino.h>
2022-06-28 10:39:35 +02:00
#define MOUTH_MIN_ANGLE 345
#define MOUTH_MAX_ANGLE 15
#define MOUTH_DISTANCE 100
2022-07-03 13:17:57 +02:00
#define MOUTH_MAX_DISTANCE 120
2019-11-18 14:42:43 +01:00
class DataSourceBall : public DataSource{
public:
DataSourceBall(HardwareSerial* ser, int baud);
2019-11-18 14:42:43 +01:00
void postProcess() override;
void test() override;
2021-05-07 21:39:03 +02:00
bool isInMouth();
bool isInMouthMaxDistance();
bool isInFront();
2019-11-25 17:30:47 +01:00
int angle, distance, angleFix;
2019-11-18 14:42:43 +01:00
bool ballSeen;
2019-11-27 17:17:18 +01:00
};