summaryrefslogtreecommitdiff
path: root/i/chuck/src/ai/ai.cc
diff options
context:
space:
mode:
authorbecquet2007-05-16 07:28:35 +0000
committerbecquet2007-05-16 07:28:35 +0000
commit3f7c1141e46c38c6697c4c349d611217d984dc9b (patch)
tree01278b5a44e430cb8b3a56875d8ec23089d52af6 /i/chuck/src/ai/ai.cc
parent0652c9a30a33b3b07f1852e23b9d2e41f3638c99 (diff)
mise a jour avant départ
Diffstat (limited to 'i/chuck/src/ai/ai.cc')
-rw-r--r--i/chuck/src/ai/ai.cc28
1 files changed, 25 insertions, 3 deletions
diff --git a/i/chuck/src/ai/ai.cc b/i/chuck/src/ai/ai.cc
index b0bc102..e078bb6 100644
--- a/i/chuck/src/ai/ai.cc
+++ b/i/chuck/src/ai/ai.cc
@@ -244,11 +244,19 @@ Ai::progMatch(void)
while (!update ());
/// En avant guingamp
log_ ("match") << "Eloignement du bord";
- motorMove(480,0);
+ motorMove(900,0);//On fonce tout droit
while (!update ());
/// On tourner de -90°
- log_ ("match") << "Petite rotation de 90°";
- motorMove(216,-216);
+ log_ ("match") << "Petite rotation de 45°";
+ motorRotate(3.1416/(-4.)*(coefcolor));
+
+ ///On avance a travers les ordures euh on est sensé en ramacer
+ motorMove(900.,0.);
+
+ ///On se positionne pour la marche arrière
+ /*
+ motorRotate(3.1416/(-4.)*(coefcolor));
+ */
/// On dit bonjour au mur
log_ ("match") << "Va à l'opposé";
if (!motorMove (1000, 0))
@@ -312,3 +320,17 @@ void
Ai::motorDeblock (void)
{
}
+/// The Best Evite Program ;p
+void
+Ai::avoidrobot(void)
+{
+ motorRotate(3.14116/2*(coefcolor));//faire calcul ailleur
+ motorMove(100.,0.);
+ motorRotate(3.14116/(-2)*(coefcolor));//voir plus haut
+ motorMove(300.,0.);
+ motorRotate(3.14116/(-2)*(coefcolor));
+ motorMove(100.,0.);
+ motorRotate(3.14116/2*(coefcolor));
+ motorMove(300.,0.);
+}
+