Test

Dependencies:   mbed DRV8825

Revision:
23:a74135a0271d
Parent:
22:f891c2bce091
Child:
24:be2b2be6907b
--- a/odo_asserv.cpp	Tue Oct 27 17:27:33 2020 +0000
+++ b/odo_asserv.cpp	Wed Oct 28 16:27:05 2020 +0000
@@ -3,7 +3,7 @@
 
 /* #define & constantes */
 #define VMAXROT 0.050
-#define VMAXLIN 0.100
+#define VMAXLIN 0.080
 #define entraxe 253 // (Valeur théorique = 255)
 const double coeffGLong = 5.956, coeffDLong = 5.956; // tics/millimètre
 
@@ -78,8 +78,8 @@
 // Ligne droite
 double erreurPreDist = 0;
 double deltaErreurDist = 0;
-const double coeffProDist = 0.0005; // 0.010 de base
-const double coeffDerDist = 0.0005; // 0.010 de base
+const double coeffProDist = 0.0004; // 0.010 de base
+const double coeffDerDist = 0.0004; // 0.010 de base
 
 // NEW NEW NEW NEW
 int fnc = 0;
@@ -163,7 +163,7 @@
             double deltaCommande = (abs(coeffPro * erreurAngle) + abs(coeffDer * deltaErreur));
 
             if(acc) {
-                cmdG = cmdG + 0.0005; // +0.0008
+                cmdG = cmdG + 0.0001; // +0.0008
                 cmdD = cmdG;
 
                 if (cmdG >= VMAXROT) acc = 0;
@@ -211,7 +211,7 @@
             double deltaCommande2 = (abs(coeffProDist * distanceCible) + abs(coeffDerDist * deltaErreurDist));
 
             if(acc) {
-                cmdG = cmdG + 0.001; // +0.0008
+                cmdG = cmdG + 0.0001; // +0.0008
                 cmdD = cmdG;
 
                 if (cmdG >= VMAXLIN) {