Dylan Saada / Mbed 2 deprecated telemetre2

Dependencies:   mbed

Revision:
0:6ce9c65992e5
diff -r 000000000000 -r 6ce9c65992e5 all_includes.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/all_includes.h	Wed Apr 15 06:23:18 2015 +0000
@@ -0,0 +1,117 @@
+#include "mbed.h"
+#include "USBHostSerial.h"
+#include "fichier_map.h"
+#include "ident_crac.h" 
+
+#include "can.h"
+#include "ident.h"
+
+#include "ktypes.h"
+
+#include "IHM.h"
+
+extern Serial pc; // tx, rx
+extern short cooXdepart,cooYdepart;
+
+extern "C" void mbed_reset();
+
+#define NOMBRE_COINS 6
+#define NOMBRE_GOBELETS 5
+#define NOMBRE_PIEDS 16
+
+
+#define VAL 2
+#define DIST_DISCONT 80  //80
+
+#define MAX_X 32
+#define MAX_Y 22
+
+#define BLEU 0
+#define ROUGE 1
+
+#define M_PI        3.14159265358979323846
+#define DELTA_ANGLE 0.006136 //2*3.14159265358979323846/1024.
+
+//#define SEUIL_DISCONTINUITE 10
+
+
+#define DEBUGING 1
+//#define COODEBUGING 1
+
+#ifdef TETE_EN_BAS
+    #define COEF_TETE_EN_BAS -1
+#else
+    #define COEF_TETE_EN_BAS 1
+#endif
+
+#ifdef DEBUGING
+    #define DEBUG_PRINTF pc.printf
+#else
+    #define DEBUG_PRINTF
+#endif
+
+#ifdef COODEBUGING
+    #define COO_PRINTF pc.printf
+#else
+    #define COO_PRINTF
+#endif
+
+
+typedef struct
+{
+char command[3] ;
+char string_character[17];
+unsigned char length_command;
+unsigned short debut;
+unsigned short fin;
+unsigned char count;
+unsigned char scan_interval;
+unsigned char number_of_scan;
+char created_command[32];
+unsigned short length_reponse;
+unsigned short number_of_full_frame;
+unsigned short size_of_incomplete_frame;
+} T_cmd;
+
+extern unsigned short angle_cartographie;
+extern short cooX_demande,cooY_demande;                                // coo du point a mesure dans le repere absolue de la table
+extern short cooXdepart,cooYdepart;                                    // coo debut du match dans le repere absolue de la table
+extern short cooX_actuelle, cooY_actuelle,teta_actuelle;       // coo du robot dans le repere absolue de la table
+extern short x_telemetre, y_telemetre;                                 // coo dans le repere du telemetre
+extern double teta,teta_actuelle_rad;                               // angle 
+extern unsigned char flag_mbed_reset;
+
+typedef enum 
+{
+    BEGIN_CONNECTION,
+    WAIT_CONNECTION,
+    CONNECTION_OK,
+    TRANSITION,
+    DETECTION,
+    TELEMETRE_GOBELET_CONNU,
+    ENVOI_CAN_ECRAN,
+    ENVOI_CAN_STRAT,
+    SEND_COMMAND,
+    WAIT_ECHO_COMMAND,
+    WAIT_STATUS,
+    WAIT_ANSWER_BEGIN,
+    WAIT_TIMESTAMP,
+    WAIT_FULL_FRAME,
+    WAIT_INCOMPLETE_FRAME,
+    SEND_STATE,
+    MS2,
+    MS_ECHO,
+    BEFORE_END,
+    END,
+    END2,
+    END3,
+		RESET,
+} ETAT;
+
+extern ETAT etat_connection;
+
+void automate_connection(void);   
+
+
+
+