![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
first commit
Dependencies: C12832_lcd DigiLogger XBeeLib mbed
Fork of XBee802_Receive_Data by
Diff: main.cpp
- Revision:
- 2:1a8a4587b870
- Parent:
- 0:155647ac203f
--- a/main.cpp Tue May 05 18:28:53 2015 +0200 +++ b/main.cpp Fri May 08 11:51:45 2015 +0200 @@ -24,16 +24,9 @@ static void receive_cb(const RemoteXBee802& remote, bool broadcast, const uint8_t *const data, uint16_t len) { if (remote.is_valid_addr16b()) { - uint16_t remote16; - remote.get_addr(&remote16); - - log_serial->printf("\r\nGot a %s 16-bit RX packet [%04x], len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote16, len); + log_serial->printf("\r\nGot a %s 16-bit RX packet [%04x], len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote.get_addr16(), len); } else { - Addr64 remote64; - remote.get_addr(&remote64); - - log_serial->printf("\r\nGot a %s 64-bit RX packet [%08x:%08x], len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", - remote64.get_high32(), remote64.get_low32(), len); + log_serial->printf("\r\nGot a %s 64-bit RX packet [%08x:%08x], len %d\r\nData: ", broadcast ? "BROADCAST" : "UNICAST", remote.get_addr64(), len); } for (int i = 0; i < len; i++)