summaryrefslogtreecommitdiff
path: root/i/marvin/src/es
diff options
context:
space:
mode:
authordufourj2006-05-26 15:47:50 +0000
committerdufourj2006-05-26 15:47:50 +0000
commit6816e1505503bfeb39b3f9e4156e2514907cdbba (patch)
treed448be92c7ff6ed5e9c64078da6a19590349af77 /i/marvin/src/es
parent76269fe0b3aac7343ee8828840c6d89abd5ee226 (diff)
Génral :
- commit post 3eme match.
Diffstat (limited to 'i/marvin/src/es')
-rw-r--r--i/marvin/src/es/es.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/i/marvin/src/es/es.cc b/i/marvin/src/es/es.cc
index 7b0505b..03fa74b 100644
--- a/i/marvin/src/es/es.cc
+++ b/i/marvin/src/es/es.cc
@@ -32,7 +32,9 @@
/// Constructeur
Es::Es (const Config & config)
: proto_ (*this), log_ ("Es"), lcdKeyPressed_ (-1), front_sensor_ (false),
- jackIn_ (false), colorModeBlue_ (false),positionBarillet_(avant0),frontTurbineIsFull_(false), unknownColor_ (-1), redColor_ (2), blueColor_ (1), greenColor_ (0), whiteColor_ (5),
+ jackIn_ (false), colorModeBlue_
+(false),positionBarillet_(avant0),frontTurbineIsFull_(false), unknownColor_
+(-2), redColor_ (2), blueColor_ (1), greenColor_ (0), whiteColor_ (5),
blackColor_ (4), leftFrontRVB_ (0), rightFrontRVB_ (1), holeRVB_ (2),
frontBallRVB_ (3), rearBallRVB_ (4)
{
@@ -314,6 +316,7 @@ Es::deposeBalle(void)
barilletDebutLancement();
log_ ("Es::Barillet", Log::debug) << "DROP!! ";
frontTurbineIsFull_ = false;
+ barilletLancement();
}
/// Dépose une balle blanche
@@ -491,6 +494,10 @@ void Es::receive(char command, const Proto::Frame & frame)
case 3: // une balle miam par l'arrière
newBallRear();
break;
+ case 4:
+ // A ball has been by the sensor at the front of the barillet
+ enableAllSensors (true);
+ break;
}
shutUp ();
}
@@ -649,6 +656,7 @@ Es::newBallFront(void)
if(!barilletIsFull())
barilletLancement();
log_ ("Es::Barillet", Log::debug) << "gobage balle par l'avant.";
+ enableAllSensors (false);
}
/// Analyse une balle arrivant par derrière
@@ -687,6 +695,7 @@ Es::newBallRear(void)
break;
}
log_ ("Es::Barillet", Log::debug) << "gobage balle par l'arriere.";
+ enableAllSensors (false);
}
/// Update system for one sensor