Commit d2d28cb1 authored by Guillaume Buret's avatar Guillaume Buret

Added Construction zone class

parent 72773939
......@@ -58,20 +58,20 @@ HEADERS += \
../../include/hardware/limitSwitchSensor.h \
../../include/hardware/ligthBarrierSensor.h \
../../include/hardware/ax12api.h \
../../include/hardware/leds.h \
../../include/hardware/leds.h \
../../include/hardware/analogSensor.h \
../../include/strategie/strategieV2.h \
../../include/strategie/recalibrerOdometrie.h \
../../include/strategie/mediumLevelAction.h \
../../include/strategie/actionGoTo.h \
../../include/strategie/mediumLevelAction.h \
../../include/strategie/actionGoTo.h \
../../include/simul/userdata.h \
../../include/simul/contactlistener.h \
../../include/strategie/strategiev3.h \
../../include/strategie/etape.h \
../../include/strategie/cabine.h \
../../include/strategie/zoneConstruction.h \
../../include/strategie/dijkstra.h \
../../include/hardware/tourelle.h \
../../src/strategie/clap.h \
../../include/strategie/clap.h \
../../include/strategie/gobelet.h \
../../include/strategie/tapis.h \
......@@ -182,7 +182,8 @@ SOURCES += \
../../src/initialisation.cpp \
../../src/strategie/krabijunior2016.cpp \
../../src/strategie/krabi2016.cpp \
../../src/strategie/cabine.cpp
../../src/strategie/cabine.cpp \
../../src/strategie/zoneConstruction.cpp
FORMS += \
../../include/simul/remotedebug.ui \
......
......@@ -21,6 +21,7 @@ public:
ROBOT_VU_ICI = 100,
CABINE = 8,
ZONE_CONSTRUCTION = 9,
POINT_PASSAGE = 0,
COLLECT = 1,
......@@ -28,9 +29,6 @@ public:
DEPART = 5,
DEPOSE_FEU = 6,
DEPOSE_FRUIT = 7,
FEU_TERRAIN = 11,
TIR_MAMMOUTH = 12,
TIR_FILET = 13,
FEU_MINI_BRAS = 14,
FEU_COTE = 15,
CENTRE_TABLE = 16,
......@@ -50,9 +48,6 @@ public:
ROBOT_DEPART = DEPART + ROBOT_VU_ICI,
ROBOT_DEPOSE_FEU = DEPOSE_FEU + ROBOT_VU_ICI,
ROBOT_DEPOSE_FRUIT = DEPOSE_FRUIT + ROBOT_VU_ICI,
ROBOT_FEU_TERRAIN = FEU_TERRAIN + ROBOT_VU_ICI,
ROBOT_TIR_MAMMOUTH = TIR_MAMMOUTH + ROBOT_VU_ICI,
ROBOT_TIR_FILET = TIR_FILET + ROBOT_VU_ICI,
ROBOT_FEU_MINI_BRAS = FEU_MINI_BRAS + ROBOT_VU_ICI,
ROBOT_CENTRE_TABLE = CENTRE_TABLE + ROBOT_VU_ICI,
ROBOT_CLAP = CLAP + ROBOT_VU_ICI,
......
......@@ -9,6 +9,7 @@
#include "etape.h"
#include "clap.h"
#include "gobelet.h"
#include "zoneConstruction.h"
#include "tapis.h"
#include "cabine.h"
#include "ramasserPied.h"
......
#ifndef ZONECONSTRUCTION_H
#define ZONECONSTRUCTION_H
#include "position.h"
#include "mediumLevelAction.h"
#include "command.h"
class ZoneConstruction : public MediumLevelAction
{
public:
ZoneConstruction();
ZoneConstruction(Position position);
~ZoneConstruction();
int update();
Etape::EtapeType getType();
protected:
Position position;
};
#endif // ZONECONSTRUCTION_H
......@@ -357,6 +357,8 @@ QString Etape::getNameType(EtapeType type)
{
case CABINE:
return "Cabine";
case ZONE_CONSTRUCTION:
return "Zone de construction";
case POINT_PASSAGE:
return "Passage";
case DEPART:
......@@ -384,6 +386,8 @@ QString Etape::getShortNameType(EtapeType type)
{
case CABINE:
return "Cabine";
case ZONE_CONSTRUCTION:
return "Z.C";
case POINT_PASSAGE:
return "";
case DEPART:
......
......@@ -25,10 +25,10 @@ Krabi2016::Krabi2016(bool isYellow) : StrategieV3(isYellow)
int wc = Etape::makeEtape(Position(1120, 1203, true));
/** Actions **/
// Gobelets
int ga = Etape::makeEtape(new Gobelet(Position(910, 805, true)));
int gb = Etape::makeEtape(new Gobelet(Position(1500, 1650, true)));
int gc = Etape::makeEtape(new Gobelet(Position(2090, 800, true)));
// Zone de construction
int zc1 = Etape::makeEtape(new ZoneConstruction(Position(910, 805, true)));
int zc2 = Etape::makeEtape(new ZoneConstruction(Position(1500, 1350, true)));
int zc3 = Etape::makeEtape(new ZoneConstruction(Position(2090, 800, true)));
// Pieds
int pa = Etape::makeEtape(new RamasserPied(Position(870, 1355, true)));
......@@ -42,9 +42,9 @@ Krabi2016::Krabi2016(bool isYellow) : StrategieV3(isYellow)
Etape::get(start) ->addVoisin(wa);
Etape::get(wa) ->addVoisin(wb, wc);
Etape::get(wb) ->addVoisin(wc);
Etape::get(ga) ->addVoisin(wb, gb);
Etape::get(gb) ->addVoisin(wc);
Etape::get(gc) ->addVoisin(wc);
Etape::get(zc1) ->addVoisin(wb, zc2);
Etape::get(zc2) ->addVoisin(wc);
Etape::get(zc3) ->addVoisin(wc);
Etape::get(pa) ->addVoisin(wb, wc);
Etape::get(pb) ->addVoisin(pa, wc);
......
#include "zoneConstruction.h"
#include "strategieV2.h"
#include "mediumLevelAction.h"
#include "command.h"
#include "position.h"
#ifndef ROBOTHW
#include <QDebug>
#endif
ZoneConstruction::ZoneConstruction(){}
ZoneConstruction::ZoneConstruction(Position position):MediumLevelAction(position)
{
}
ZoneConstruction::~ZoneConstruction(){}
Etape::EtapeType ZoneConstruction::getType()
{
return Etape::ZONE_CONSTRUCTION;
}
int ZoneConstruction::update()
{
if (status == 0) //Début
{
#ifndef ROBOTHW
qDebug() << "Zone de onstruction";
#endif
}
return status;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment