systems: introduce empty systems for testing purposes
parent
f99d467c36
commit
b4bc48b9ed
|
@ -19,7 +19,7 @@
|
|||
#define GOALIE_ATKDIR_PLUSANG2_COR 70
|
||||
#define GOALIE_ATKDIR_PLUSANG3_COR 70
|
||||
|
||||
class Striker : public Game, public PositionSysZone{
|
||||
class Striker : public Game{
|
||||
|
||||
public:
|
||||
Striker();
|
||||
|
|
|
@ -29,8 +29,8 @@ class PositionSysCamera : public PositionSystem{
|
|||
|
||||
public:
|
||||
PositionSysCamera();
|
||||
void goCenter();
|
||||
void centerGoal();
|
||||
void goCenter() override;
|
||||
void centerGoal() override;
|
||||
void setMoveSetpoints(int x, int y);
|
||||
void addMoveOnAxis(int x, int y);
|
||||
void update() override;
|
||||
|
|
|
@ -11,4 +11,20 @@ class PositionSystem{
|
|||
public:
|
||||
virtual void update() = 0;
|
||||
virtual void test() = 0;
|
||||
virtual void goCenter() = 0;
|
||||
virtual void centerGoal() = 0;
|
||||
};
|
||||
|
||||
class LineSystemEmpty : public LineSystem{
|
||||
public:
|
||||
void update() override;
|
||||
void test() override;
|
||||
};
|
||||
|
||||
class PositionSystemEmpty : public PositionSystem{
|
||||
public:
|
||||
void update() override;
|
||||
void test() override;
|
||||
void goCenter() override;
|
||||
void centerGoal() override;
|
||||
};
|
|
@ -23,7 +23,7 @@ void Striker::init(){
|
|||
|
||||
void Striker::realPlay(){
|
||||
if(CURRENT_DATA_READ.ballSeen) this->striker();
|
||||
else ((PositionSysCamera*)ps)->goCenter();
|
||||
else ps->goCenter();
|
||||
}
|
||||
|
||||
void Striker::striker() {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#include "systems/systems.h"
|
||||
#include "vars.h"
|
||||
#include "sensors/sensors.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
void LineSystemEmpty::update(){
|
||||
tookLine = false;
|
||||
}
|
||||
void LineSystemEmpty::test(){
|
||||
DEBUG.println("Empty LineSystem ready!");
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
#include "systems/systems.h"
|
||||
#include "vars.h"
|
||||
#include "sensors/sensors.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
void PositionSystemEmpty::update(){
|
||||
}
|
||||
|
||||
void PositionSystemEmpty::test(){
|
||||
DEBUG.println("Empty PositionSystemEmpty ready!");
|
||||
}
|
||||
|
||||
void PositionSystemEmpty::goCenter(){
|
||||
drive->prepareDrive(0,0,0);
|
||||
}
|
||||
|
||||
void PositionSystemEmpty::centerGoal(){
|
||||
drive->prepareDrive(0,0,0);
|
||||
}
|
Loading…
Reference in New Issue