Commit e1a5330efe67af495a41daeb604be95460decd0f

Authored by troj
1 parent 58842de0

Commit Fin de projet

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
@@ -21,7 +21,7 @@ void Reponse(int ds) @@ -21,7 +21,7 @@ void Reponse(int ds)
21 char d[TAILLE_TAMPON]; 21 char d[TAILLE_TAMPON];
22 sync(); 22 sync();
23 for(i=0;i<TAILLE_TAMPON;i++){ 23 for(i=0;i<TAILLE_TAMPON;i++){
24 - if(read(ds,d+i,1)!=1){ perror("xbeeReponse.read"); exit(-1); } 24 + if(read(ds,d+i,1)!=1){ perror("Reponse.read"); exit(-1); }
25 if(d[i]==0x0d) break; 25 if(d[i]==0x0d) break;
26 } 26 }
27 int size=i; 27 int size=i;
@@ -38,9 +38,9 @@ void Reponse(int ds) @@ -38,9 +38,9 @@ void Reponse(int ds)
38 void ModeCommande(int ds) 38 void ModeCommande(int ds)
39 { 39 {
40 #ifdef DEBUG 40 #ifdef DEBUG
41 - printf("{xbeeModeCommande}\n"); 41 + printf("{ModeCommande}\n");
42 #endif 42 #endif
43 - char *cmd="+++++++++++++++++"; 43 + char *cmd="+++++++++++++++++"; //Obligation de saturer le buffer pour send commande
44 sleep(1); 44 sleep(1);
45 sync(); 45 sync();
46 write(ds,cmd,strlen(cmd)); 46 write(ds,cmd,strlen(cmd));
@@ -50,9 +50,9 @@ void ModeCommande(int ds) @@ -50,9 +50,9 @@ void ModeCommande(int ds)
50 void Answer(int ds) 50 void Answer(int ds)
51 { 51 {
52 #ifdef DEBUG 52 #ifdef DEBUG
53 - printf("{xbeeRecupereVitesse}\n"); 53 + printf("{Answer}\n");
54 #endif 54 #endif
55 - char *cmd="TAATAATAATAATAATA\r"; 55 + char *cmd="TAATAATAATAATAATA\r"; //Saturation buffer
56 write(ds,cmd,strlen(cmd)); 56 write(ds,cmd,strlen(cmd));
57 Reponse(ds); 57 Reponse(ds);
58 } 58 }