Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: XBeeApiBroadcastExample
Revision 4:d6c480d80f84, committed 2014-07-06
- Comitter:
- johnb
- Date:
- Sun Jul 06 21:01:14 2014 +0000
- Parent:
- 3:8fea787c2199
- Commit message:
- Updated to use constructor rather than method calls to set up TX frame
Changed in this revision
| XBeeApi.lib | 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/XBeeApi.lib Fri Mar 28 22:31:04 2014 +0000 +++ b/XBeeApi.lib Sun Jul 06 21:01:14 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/johnb/code/XBeeApi/#cc7e8d1e35dd +http://mbed.org/users/johnb/code/XBeeApi/#85a66d56e176
--- a/main.cpp Fri Mar 28 22:31:04 2014 +0000
+++ b/main.cpp Sun Jul 06 21:01:14 2014 +0000
@@ -58,7 +58,7 @@
XBeeDevice::XBeeDeviceReturn_t status;
/* This is the frame we're going to transmit */
- XBeeApiTxFrame frame( &xbeeDevice );
+ XBeeApiTxFrame frame( &xbeeDevice, tx_data, sizeof( tx_data ), frameDestinationAddress );
/* Get API mode 2 set up - this is a pre-requisit to using other XBeeApi functions.
This step may not be needed in the case that the XBee has already been configured
@@ -72,10 +72,6 @@
/* Set up a peer-to-peer network using the specified PAN and channel */
xbeeSetNetworkTypeP2P( &atIf, myPANId, myChannelId );
- /* Set the data pointer & destination address in the transmit frame */
- frame.setDataPtr( tx_data, sizeof( tx_data ) );
- frame.setDestAddr( frameDestinationAddress );
-
xbeeDevice.SendFrame( &frame );
}
}
\ No newline at end of file