2019-12-05 11:53:01 +01:00
|
|
|
#pragma once
|
2019-12-26 17:44:58 +01:00
|
|
|
|
2019-12-05 11:53:01 +01:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
2020-02-29 22:10:53 +01:00
|
|
|
#include "behaviour_control/ds_ctrl.h"
|
|
|
|
#include "position/systems.h"
|
|
|
|
|
|
|
|
#include "vars.h"
|
|
|
|
|
2020-05-05 17:57:43 +02:00
|
|
|
#define S1I 21 //A14 N
|
|
|
|
#define S1O 20 //A15
|
|
|
|
#define S2I 17 //A16 E
|
|
|
|
#define S2O 16 //A17
|
|
|
|
#define S3I 15 //A20 S
|
|
|
|
#define S3O 14 //A0
|
|
|
|
#define S4I 23 //A1 O
|
|
|
|
#define S4O 22 //A2
|
2019-12-05 11:53:01 +01:00
|
|
|
|
|
|
|
#define LINE_THRESH 90
|
2020-03-02 18:48:29 +01:00
|
|
|
#define EXTIME 200
|
2020-01-13 17:07:26 +01:00
|
|
|
#define LINES_EXIT_SPD 350
|
2019-12-05 11:53:01 +01:00
|
|
|
|
2019-12-26 17:44:58 +01:00
|
|
|
class LineSys2019 : public LineSystem{
|
2019-12-05 11:53:01 +01:00
|
|
|
|
|
|
|
public:
|
2019-12-26 17:44:58 +01:00
|
|
|
LineSys2019();
|
|
|
|
LineSys2019(vector<DataSource*> in_, vector<DataSource*> out);
|
2019-12-05 11:53:01 +01:00
|
|
|
|
2019-12-26 17:44:58 +01:00
|
|
|
void update() override;
|
|
|
|
void test() override;
|
2019-12-05 11:53:01 +01:00
|
|
|
void outOfBounds();
|
|
|
|
|
|
|
|
private:
|
|
|
|
vector<DataSource*> in, out;
|
|
|
|
DataSource* ds;
|
|
|
|
bool fboundsX, fboundsY, fboundsOX, fboundsOY, slow;
|
2020-01-13 17:07:26 +01:00
|
|
|
int inV, outV, linesensOldX, linesensOldY, value, linetriggerI[4], linetriggerO[4], i;
|
2019-12-05 11:53:01 +01:00
|
|
|
elapsedMillis exitTimer;
|
2020-01-15 13:55:51 +01:00
|
|
|
int outDir, outVel;
|
|
|
|
byte linesens;
|
2019-12-05 11:53:01 +01:00
|
|
|
};
|