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
test_modem.c
... ... @@ -21,7 +21,7 @@ void Reponse(int ds)
21 21 char d[TAILLE_TAMPON];
22 22 sync();
23 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 25 if(d[i]==0x0d) break;
26 26 }
27 27 int size=i;
... ... @@ -38,9 +38,9 @@ void Reponse(int ds)
38 38 void ModeCommande(int ds)
39 39 {
40 40 #ifdef DEBUG
41   - printf("{xbeeModeCommande}\n");
  41 + printf("{ModeCommande}\n");
42 42 #endif
43   - char *cmd="+++++++++++++++++";
  43 + char *cmd="+++++++++++++++++"; //Obligation de saturer le buffer pour send commande
44 44 sleep(1);
45 45 sync();
46 46 write(ds,cmd,strlen(cmd));
... ... @@ -50,9 +50,9 @@ void ModeCommande(int ds)
50 50 void Answer(int ds)
51 51 {
52 52 #ifdef DEBUG
53   - printf("{xbeeRecupereVitesse}\n");
  53 + printf("{Answer}\n");
54 54 #endif
55   - char *cmd="TAATAATAATAATAATA\r";
  55 + char *cmd="TAATAATAATAATAATA\r"; //Saturation buffer
56 56 write(ds,cmd,strlen(cmd));
57 57 Reponse(ds);
58 58 }
... ...