summaryrefslogtreecommitdiff
path: root/2005/i
diff options
context:
space:
mode:
Diffstat (limited to '2005/i')
-rw-r--r--2005/i/robert/src/es/es.hh32
-rw-r--r--2005/i/robert/src/motor/motor.hh35
2 files changed, 63 insertions, 4 deletions
diff --git a/2005/i/robert/src/es/es.hh b/2005/i/robert/src/es/es.hh
index 771a2b4..5eebc46 100644
--- a/2005/i/robert/src/es/es.hh
+++ b/2005/i/robert/src/es/es.hh
@@ -25,8 +25,36 @@
//
// }}}
-class Es
+/// Gère la carte es et ses capteurs et actionneurs
+class Es : public Proto::Receiver
{
-}
+ private:
+ // Objet Proto de communication vers la carte es
+ Proto proto_;
+ // vitesse de déplacement de l'ascenceur
+ int vitesseAsc_;
+ // couleur de notre camp (rouge/vert);
+ int couleur_;
+
+ public:
+ /// Constructeur
+ Es (const Config & config);
+ /// Initialise les capteurs et actionneurs
+ void init(void);
+ // Renvoie la position du jack (false si entré, true si sortie)
+ bool stateJack(void);
+ /// Renvoie l'état des capteurs de contact(true si les 2 enfoncés)
+ bool capteursContact(void);
+ /// Renvoie la position de l'ascenceur(true en haut false en bas)
+ bool stateAsc(void);
+ /// Execute un déplacement de l'ascenceur
+ void moveAsc(bool monte);
+ /// Désactive les ventouses pour X secondes XXX vérifier la durées arg/config
+ void ventouses(void);
+ /// Indique la position des ventouses(false quand désactivé)
+ bool stateVentouses (void);
+ /// définition du receiver::receive
+ void receive(char command, const Proto::Frame & frame);
+};
#endif // es_hh
diff --git a/2005/i/robert/src/motor/motor.hh b/2005/i/robert/src/motor/motor.hh
index c052c6b..22298e0 100644
--- a/2005/i/robert/src/motor/motor.hh
+++ b/2005/i/robert/src/motor/motor.hh
@@ -13,7 +13,7 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -25,7 +25,38 @@
//
// }}}
+#include "config/config.hh"
+
+/// Gère les moteurs de déplacement du robot
class Motor
{
-}
+ private:
+ double posX_;
+ double posY_;
+ double speed_;
+
+ public:
+ /// Constructeur
+ Motor (const Config & config);
+ /// Initialise les moteurs
+ void init(void);
+ ///Arrête les moteurs
+ void stop(void);
+ /// Renvoie la position X
+ double getX(void);
+ /// Renvoie la position Y
+ double getY(void);
+ /// Ammène le robot à la position x,y
+ void goTo(double x, double y);
+ /// Recale le robot
+ void recalage(void);
+ /// Règle la vitesse des moteurs
+ void setSpeed(double v);
+ /// Indique si les moteurs sont occupé ou non
+ bool idle (void);
+ /// Execute un déplacement linéaire
+ void linearMove(double d);
+ /// Execute une rotation(argument en radian)
+ void rotation(double a);
+};
#endif // motor.hh