diff --git a/include/strategy_roles/striker.h b/include/strategy_roles/striker.h index 6500e71..44e0574 100644 --- a/include/strategy_roles/striker.h +++ b/include/strategy_roles/striker.h @@ -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(); diff --git a/include/systems/position/positionsys_camera.h b/include/systems/position/positionsys_camera.h index a099743..2bde499 100644 --- a/include/systems/position/positionsys_camera.h +++ b/include/systems/position/positionsys_camera.h @@ -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; diff --git a/include/systems/systems.h b/include/systems/systems.h index 84d4e5e..021149c 100644 --- a/include/systems/systems.h +++ b/include/systems/systems.h @@ -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; }; \ No newline at end of file diff --git a/src/strategy_roles/striker.cpp b/src/strategy_roles/striker.cpp index 591a641..1f596fe 100644 --- a/src/strategy_roles/striker.cpp +++ b/src/strategy_roles/striker.cpp @@ -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() { diff --git a/src/system/lines/linesys_empty.cpp b/src/system/lines/linesys_empty.cpp new file mode 100644 index 0000000..0f25ac9 --- /dev/null +++ b/src/system/lines/linesys_empty.cpp @@ -0,0 +1,11 @@ +#include "systems/systems.h" +#include "vars.h" +#include "sensors/sensors.h" +#include + +void LineSystemEmpty::update(){ + tookLine = false; +} +void LineSystemEmpty::test(){ + DEBUG.println("Empty LineSystem ready!"); +} \ No newline at end of file diff --git a/src/system/positions/positionsys_empty.cpp b/src/system/positions/positionsys_empty.cpp new file mode 100644 index 0000000..2ccccf0 --- /dev/null +++ b/src/system/positions/positionsys_empty.cpp @@ -0,0 +1,19 @@ +#include "systems/systems.h" +#include "vars.h" +#include "sensors/sensors.h" +#include + +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); +}