From c7c965f96621555cfd53802d192f72a12e305f56 Mon Sep 17 00:00:00 2001 From: becquet Date: Sat, 12 May 2007 03:50:40 +0000 Subject: --- i/chuck/src/ai/ai.cc | 4 +++- i/chuck/src/ai/ai.hh | 1 + i/chuck/src/es/es.cc | 20 +++++++++++++++----- i/chuck/src/es/es.hh | 14 ++++++-------- 4 files changed, 25 insertions(+), 14 deletions(-) (limited to 'i/chuck') diff --git a/i/chuck/src/ai/ai.cc b/i/chuck/src/ai/ai.cc index 5d328c2..b0bc102 100644 --- a/i/chuck/src/ai/ai.cc +++ b/i/chuck/src/ai/ai.cc @@ -51,7 +51,7 @@ Ai::~Ai(void) // On réinitialise // Initialise les moteurs // XXX - motor_.reset (); + motor_.reset(); // initialise la carte es es_.reset (); // On sync @@ -137,6 +137,8 @@ Ai::prepare (void) { es_.lcdPrint(""); es_.lcdPrint("Prepa match..."); + coefcolor=es_.setcolorsens(); + es_.lcdPrint("G ma couleur"); es_.lcdPrint("Inserer Jack"); es_.setOthersStat (10); while (!update ()); diff --git a/i/chuck/src/ai/ai.hh b/i/chuck/src/ai/ai.hh index 781935a..b45122a 100644 --- a/i/chuck/src/ai/ai.hh +++ b/i/chuck/src/ai/ai.hh @@ -49,6 +49,7 @@ class Ai const int schedule_time_; const int reference_sensor_mask_; bool mustRotate_; + const int coefcolor; public: /// Constructeur Ai(const Config & config); diff --git a/i/chuck/src/es/es.cc b/i/chuck/src/es/es.cc index 452e689..a8cc10c 100644 --- a/i/chuck/src/es/es.cc +++ b/i/chuck/src/es/es.cc @@ -130,11 +130,6 @@ Es::setOthersStat (int freq) } - - - - - /// Set update frequency of sharps void Es::setSharpUpdate (int sharp_mask, int freq) @@ -249,3 +244,18 @@ Es::bouge_ascenceur(int sens,uint8_t vit,uint8_t tps) //permettra de faire l'inverse en automatique. } +//le roulo qui roule +void +Es::roulo_roule(int vit) //je c pas encore trop le type +{ + proto_.send('R',"b",vit); +} + +//Euh kel est mon facteur de symetrie pour l'asserv?? +int +Es::setcolorsens(void) +{ + if colorModeBlue_ {return 1;} + else {return -1;} +} + diff --git a/i/chuck/src/es/es.hh b/i/chuck/src/es/es.hh index 0de1264..9096dec 100644 --- a/i/chuck/src/es/es.hh +++ b/i/chuck/src/es/es.hh @@ -100,8 +100,6 @@ class Es : public Proto::Receiver void setOthersStat (int freq); - - /// Set update frequency of sharps void setSharpUpdate (int sharp_mask, int freq); /// Set statistics frequency of sharps @@ -114,14 +112,14 @@ class Es : public Proto::Receiver void lcdPrint (const std::string &message); /// Get the current pressed keys of the LCD void lcdGetKey (int freq); - - - - - + ///Activé l'assenceur void bouge_ascenceur(int sens,uint8_t vit,uint8_t tps); - //a faire + ///rotate Left or Right + int setcolorsens(void); + //a faire + void roulo_roule(int vit); + private: /// Update system for one sensor void updateAnalysisSensor (int value, int index, int threshold); -- cgit v1.2.3