ajout module_mouvement

Dependencies:   mbed xbee_lib ADXL345_I2C IMUfilter ITG3200 Motor RangeFinder Servo mbos PID

Fork of Labo_TRSE_Drone by HERBERT Nicolas

Revision:
31:a0800d3da787
Parent:
28:8b5ccd2f837e
Child:
32:119e060b45b3
--- a/Module_Communication/Module_Communication.cpp	Wed Apr 03 13:48:30 2013 +0000
+++ b/Module_Communication/Module_Communication.cpp	Wed Apr 17 10:16:19 2013 +0000
@@ -52,7 +52,6 @@
  
  void C_ModuleCommunication::envoiDeTrame(void)
  {
-    pc.scanf("%s",m_charTxBuffer); //Read data from serial console
     m_xbee->SendData(m_charTxBuffer);
     /*
     frame newFrame = m_trameTxBuffer->frameBuffer();
@@ -68,14 +67,15 @@
  
  void C_ModuleCommunication::receptionDeTrame(void)
  {
+    Serial pc(USBTX, USBRX);
     m_xbee->RecieveData(m_charRxBuffer, 0);
-    pc.printf("You said:%s",m_charRxBuffer);
+    pc.printf("You said:%s \n",m_charRxBuffer);
     /*
     frame newFrame;
     newFrame.identifier = m_charRxBuffer[0];
     
     for(int i = 0; i < 8; i++) {
-        newFrame.data[0] = m_charRxBuffer[i+1];
+        newFrame.data[i] = m_charRxBuffer[i+1];
     }
     
     m_trameRxBuffer->frameBuffer(newFrame);