TRR2018 omar

Dependencies:   mbed

Fork of biniou by TRR 2018

Revision:
23:04d393220daa
Parent:
22:26fc6e6f7a55
Child:
24:698fefbbee00
--- a/stateMachines.h	Sat Sep 15 15:56:01 2018 +0000
+++ b/stateMachines.h	Sun Sep 16 15:04:41 2018 +0000
@@ -3,6 +3,7 @@
 
 //#define DLVV
 #define SAMPLING//commenter pour désactiver
+#define DUMP_SAMPLIG_PERIOD 10000
 #define DEBUG -1//-1 pour avoir uniquement la gestion de l'interruption bouton
 
 #define NB_INTEGRAL_SAMPLES 5
@@ -12,7 +13,7 @@
 #define DIERCTION_PERIOD_MS 10000
 #define DIRECTION_PULSE_MAX 2100
 #define DIRECTION_PULSE_MIN 800
-#define DIRECTION_PULSE_MIDDLE 1500
+#define DIRECTION_PULSE_MIDDLE 1530
 
 #define SPEED_PERIOD_US 20000
 #define BRAKING_PULSE_US 1350
@@ -21,8 +22,7 @@
 #define ZERO_PULSE_SPEED_US 1500
 #define COEF_CMPS_TO_PULSE 25
 
-#define NB_ECHANTILLONS_IR 4
-#define NB_ECHANTILLONS_LIDAR 4
+#define NB_ECHANTILLONS_IR 8
 
 #define LIDAR_STRENGTH_THRESOLD 25 //pour la gestion de la vitesse MAX (MAXSpeed_ST)
 #define LIDAR_ERR 65535
@@ -61,6 +61,8 @@
     int16_t pwm_thro_us;
     int16_t pwm_dir_us;
     int16_t dist;
+    int16_t distLidar;
+    int16_t strLidar;
 } s_Sample;
 
 #endif
@@ -117,6 +119,7 @@
 uint16_t getDistMoy(uint16_t* tab, int size);
 void it4cm();
 void it_serial();
+void sampleLog();
 
 //*************** fonctions states machines ***************
 //gestion de la direction quand la vue est dégagée