SPQR-Team1-2020/include/sensors/currently_unused/data_source_us.h

21 lines
457 B
C
Raw Normal View History

2019-11-25 17:30:47 +01:00
#pragma once
#include "behaviour_control/data_source.h"
2019-11-25 17:30:47 +01:00
#define US_WAIT_TIME 70
2019-11-25 17:30:47 +01:00
class DataSourceUS : public DataSource{
public:
DataSourceUS(TwoWire* i2c_, int addr);
2019-11-25 17:30:47 +01:00
void test() override;
2019-11-27 17:17:18 +01:00
void readSensor() override;
2019-11-25 17:30:47 +01:00
void usMode();
void usTrigger();
void usReceive();
int reading;
long us_t0;
long us_t1;
2019-11-27 17:17:18 +01:00
bool us_flag;
2019-11-25 17:30:47 +01:00
};