xbee lib changé

Dependents:   Labo_TRSE_Drone

Fork of xbee_lib by Tristan Hughes

Files at this revision

API Documentation at this revision

Comitter:
tristanjph
Date:
Fri Aug 31 15:46:34 2012 +0000
Parent:
4:ede20c047d8b
Child:
6:6455a079bdb3
Commit message:
Updates to SetKey to take string

Changed in this revision

xbee.cpp Show annotated file Show diff for this revision Revisions of this file
xbee.h Show annotated file Show diff for this revision Revisions of this file
--- a/xbee.cpp	Wed Aug 29 14:34:53 2012 +0000
+++ b/xbee.cpp	Fri Aug 31 15:46:34 2012 +0000
@@ -68,14 +68,14 @@
     return 1;
 }
 
-int xbee::SetKey(int* key)
+int xbee::SetKey(char* key)
 {
     Serial DATA(_tx,_rx);
     DATA.printf("ATEE 1 \r");
 
     DATA.scanf ("%*s");
     wait_ms(1);
-    DATA.printf("ATKY %x \r",key);
+    DATA.printf("ATKY %s \r",key);
     DATA.scanf ("%*s");
     return 1;
 }
--- a/xbee.h	Wed Aug 29 14:34:53 2012 +0000
+++ b/xbee.h	Fri Aug 31 15:46:34 2012 +0000
@@ -45,7 +45,7 @@
       * @param key Pointer to the network key to set.
       * @return Returns 1 on success.
       */
-    int SetKey(int*);
+    int SetKey(char*);
     /** Sets the id of the PAN network for the Xbee to use
       * @param pan_id The id of the PAN for the Xbee to use.
       * @return Returns 1 on success.