summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub/src/apbirthday/strat.hh
diff options
context:
space:
mode:
authorNicolas Schodet2013-05-04 16:06:35 +0200
committerNicolas Schodet2013-05-04 16:07:24 +0200
commitf1369e5a073e6ed7f8211ab93934a2b8bbe5b3f4 (patch)
tree08fca5460a0f3a221e5ff1a263df10c8a9d2999c /digital/io-hub/src/apbirthday/strat.hh
parent14441591529dee7d1d22a6d9515ace8bb4270b8b (diff)
digital/io-hub/src/apbirthday: basic gifts handling
Diffstat (limited to 'digital/io-hub/src/apbirthday/strat.hh')
-rw-r--r--digital/io-hub/src/apbirthday/strat.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/digital/io-hub/src/apbirthday/strat.hh b/digital/io-hub/src/apbirthday/strat.hh
index 15c6a45d..4e962824 100644
--- a/digital/io-hub/src/apbirthday/strat.hh
+++ b/digital/io-hub/src/apbirthday/strat.hh
@@ -25,6 +25,7 @@
// }}}
#include "defs.hh"
#include "playground_2013.hh"
+#include "asserv.hh"
/// High level strategy decision making.
class Strat
@@ -34,6 +35,7 @@ class Strat
{
CANDLES,
PLATE,
+ GIFTS,
};
/// Information on a candle decision.
struct CandlesDecision
@@ -55,6 +57,16 @@ class Strat
/// the point is reached, there is no plate.
vect_t loading_pos;
};
+ /// Information on a gift decision.
+ struct GiftsDecision
+ {
+ /// Begin of movement position, same as reported by decision method.
+ vect_t begin_pos;
+ /// End of movement position.
+ vect_t end_pos;
+ /// Movement direction.
+ Asserv::DirectionConsign dir;
+ };
public:
/// Return new decision and associated position.
Decision decision (Position &pos);
@@ -63,11 +75,15 @@ class Strat
uint16_t robot_angle);
/// Take a decision related to plate.
void decision_plate (PlateDecision &decision);
+ /// Take a decision related to gifts.
+ void decision_gifts (GiftsDecision &decision);
/// Report a failure to apply the previous decision.
void failure ();
private:
/// Last plate decision.
PlateDecision plate_decision_;
+ /// Last gifts decision.
+ GiftsDecision gifts_decision_;
};
#endif // strat_hh