Gabriel Gibeau Sanchez / Mbed 2 deprecated Projet_S5_Mobile_local

Dependencies:   XBeeLib mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
jphilip
Date:
Mon Dec 04 21:34:32 2017 +0000
Parent:
6:b4f0687c4d14
Child:
8:62898720a01d
Commit message:
receive config

Changed in this revision

Capteurs/Sensors.cpp Show annotated file Show diff for this revision Revisions of this file
Xbee/xbeeutils.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Capteurs/Sensors.cpp	Mon Dec 04 20:43:20 2017 +0000
+++ b/Capteurs/Sensors.cpp	Mon Dec 04 21:34:32 2017 +0000
@@ -21,7 +21,8 @@
     read_RTD(RTDBuf);
     read_PH(phBuf);
         
-     sprintf(TxBuf,"%s;%s;%s",RTDBuf+1,phBuf+1,ECBuf+1);
+     //sprintf(TxBuf,"%s;%s;%s",RTDBuf+1,phBuf+1,ECBuf+1);
+     sprintf(TxBuf,"%s;%s;%s","1.1","2.2","3.3");
      pc.printf("%s\n",TxBuf);
      xbee_broadcast(TxBuf,strlen(TxBuf)+1);
      pc.printf("TxBuf strlen: %i\n",strlen(TxBuf));
--- a/Xbee/xbeeutils.cpp	Mon Dec 04 20:43:20 2017 +0000
+++ b/Xbee/xbeeutils.cpp	Mon Dec 04 21:34:32 2017 +0000
@@ -24,6 +24,7 @@
     xbee = new XBeeZB(RADIO_TX, RADIO_RX, RADIO_RESET, NC, NC, 9600);
     RadioStatus radioStatus = xbee->init();
     radioStatus = xbee->set_panid((uint64_t) 0xABCD);                   // Don't forget to do this with config!
+    xbee->register_receive_cb(handle_receive_data);
     
     // Wait for xbee to be ready
     while (!xbee->is_joined()) {
--- a/main.cpp	Mon Dec 04 20:43:20 2017 +0000
+++ b/main.cpp	Mon Dec 04 21:34:32 2017 +0000
@@ -73,5 +73,7 @@
         
         pc.printf("Sending actual data...\n");
         getReadings();
+        
+        process_rx_frames();
     }
 }