Projet_S5 / Mbed 2 deprecated Repo_Noeud_Mobile_refactor

Dependencies:   mbed-rtos mbed

Fork of Repo_Noeud_Mobile by Projet_S5

Revision:
52:10fb8ca4ed03
Parent:
51:299408ceee3a
Child:
55:adde1b6081b8
--- a/Communication/Xbee.cpp	Sat Apr 11 19:30:24 2015 +0000
+++ b/Communication/Xbee.cpp	Sat Apr 11 22:55:35 2015 +0000
@@ -26,6 +26,7 @@
 {
     for(int i = 0; i < size; i++) {
         XbeePin->putc(array[i]);
+        x_pc.printf("Send : %X \r\n", array[i]);
     }
 }
 
@@ -47,7 +48,7 @@
     command[1] = length1; //length first char
     command[2] = length2; //length second char
     command[3] = 0x10; //frame type - Send Request
-    command[4] = frameID; //frame ID
+    command[4] = 0x01; //frame ID
     sum += 0x10;
     sum += 0x01;
 
@@ -71,8 +72,8 @@
     }
 
     command[size-1] = 0xFF - sum; //checksum
-    Envoyer(command, size); //send frame array to XBee
-frameID++;
+    Envoyer(command, size);       //send frame array to XBee
+    frameID++;
 }
 
 void Xbee::EnvoyerStructure(Mobile_Vers_Fixe mvf)