Programa de recepción de Xbee en modo API
Fork of XBee802_Receive_Data by
Revision 10:92c101fbb485, committed 2016-05-25
- Comitter:
- mrios
- Date:
- Wed May 25 23:07:19 2016 +0000
- Parent:
- 9:cb89b64eb98e
- Commit message:
- Agrego visualizacion de rssi en cada paquete recibido.
Changed in this revision
XBeeLib.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 |
diff -r cb89b64eb98e -r 92c101fbb485 XBeeLib.lib --- a/XBeeLib.lib Sat May 21 18:55:44 2016 +0000 +++ b/XBeeLib.lib Wed May 25 23:07:19 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Digi-International-Inc/code/XBeeLib/#da2ea7a76243 +https://developer.mbed.org/teams/TP-Profesional/code/XBeeLib/#793ba17436e4
diff -r cb89b64eb98e -r 92c101fbb485 main.cpp --- a/main.cpp Sat May 21 18:55:44 2016 +0000 +++ b/main.cpp Wed May 25 23:07:19 2016 +0000 @@ -21,12 +21,12 @@ Serial *log_serial; -static void receive_cb(const RemoteXBee802& remote, bool broadcast, const uint8_t *const data, uint16_t len) +static void receive_cb(const RemoteXBee802& remote, bool broadcast, const uint8_t *const data, uint16_t len, const uint8_t rssi) { if (remote.is_valid_addr16b()) { - log_serial->printf("\r\nGot a %s 16-bit RX packet [%04x], len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote.get_addr16(), len); + log_serial->printf("\r\nGot a %s 16-bit RX packet [%04x], RSSI: -%d dBm, len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote.get_addr16(), rssi, len); } else { - log_serial->printf("\r\nGot a %s 64-bit RX packet [%08x:%08x], len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote.get_addr64(), len); + log_serial->printf("\r\nGot a %s 64-bit RX packet [%08x:%08x], RSSI: -%d dBm, len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote.get_addr64(), rssi, len); } for (int i = 0; i < len; i++)