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.
Fork of CROTUS_XBee by
Diff: xbee.cpp
- Revision:
- 3:cc699ba7a827
- Parent:
- 2:406da750f115
- Child:
- 4:6ba5b06193d1
diff -r 406da750f115 -r cc699ba7a827 xbee.cpp --- a/xbee.cpp Mon Mar 27 16:38:24 2017 +0000 +++ b/xbee.cpp Mon Apr 03 18:21:05 2017 +0000 @@ -257,18 +257,17 @@ _SetCheckSum(buffer); - while(true) { - _XbeeSend(buffer, dataLength + TRANSMIT_MIN_SIZE + FRAME_MIN_SIZE); + _XbeeSend(buffer, dataLength + TRANSMIT_MIN_SIZE + FRAME_MIN_SIZE); + + Thread::signal_wait(RESPONSE_SIGNAL); - Thread::signal_wait(RESPONSE_SIGNAL); - - switch (_responseStatus){ - case TRANSMIT_STATUS_OK: - return; - default: - _xbeeConnection = 0; - break; - } + switch (_responseStatus){ + case TRANSMIT_STATUS_OK: + _xbeeConnection = 1; + break; + default: + _xbeeConnection = 0; + break; } }