Making example tsch-rime more flexible

This commit is contained in:
Simon Duquennoy 2016-06-03 15:53:16 +02:00 committed by Simon Duquennoy
parent 78f04fda83
commit 809883e632

View file

@ -45,7 +45,6 @@
#include "net/mac/tsch/tsch.h"
const linkaddr_t coordinator_addr = { { 1, 0 } };
const linkaddr_t sender_addr = { { 2, 0 } };
const linkaddr_t destination_addr = { { 1, 0 } };
/*---------------------------------------------------------------------------*/
@ -89,7 +88,7 @@ PROCESS_THREAD(unicast_test_process, ev, data)
packetbuf_copyfrom("Hello", 5);
if(linkaddr_cmp(&sender_addr, &linkaddr_node_addr)) {
if(!linkaddr_cmp(&destination_addr, &linkaddr_node_addr)) {
printf("App: sending unicast message to %u.%u\n", destination_addr.u8[0], destination_addr.u8[1]);
unicast_send(&uc, &destination_addr);
}