2019-12-11 16:29:18 +01:00
|
|
|
#pragma once
|
2020-02-29 22:10:53 +01:00
|
|
|
|
|
|
|
#include "behaviour_control/data_source.h"
|
2019-12-11 16:29:18 +01:00
|
|
|
#include "vars.h"
|
|
|
|
|
|
|
|
class DataSourceBT : public DataSource{
|
|
|
|
|
|
|
|
public:
|
|
|
|
DataSourceBT(HardwareSerial* ser, int baud);
|
|
|
|
void test() override;
|
2021-05-14 01:57:49 +02:00
|
|
|
void update() override;
|
2019-12-11 16:29:18 +01:00
|
|
|
void connect();
|
2021-05-14 01:57:49 +02:00
|
|
|
void receive();
|
|
|
|
void send();
|
2019-12-11 16:29:18 +01:00
|
|
|
|
2021-05-14 01:57:49 +02:00
|
|
|
bool can_bombard, bt_bombarded, comrade;
|
|
|
|
unsigned long bt_timer, last_received, t;
|
|
|
|
|
|
|
|
char received, tosend;
|
2019-12-11 16:29:18 +01:00
|
|
|
};
|