From 3ff8aa8ad84d3a25f97ed5b73dbdfccf2842126b Mon Sep 17 00:00:00 2001 From: Atis Elsts Date: Mon, 25 Apr 2016 18:00:19 +0300 Subject: [PATCH] srf06-cc26xx: add node_id variable --- platform/srf06-cc26xx/contiki-main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/srf06-cc26xx/contiki-main.c b/platform/srf06-cc26xx/contiki-main.c index 9e91cec5d..b3d64f24a 100644 --- a/platform/srf06-cc26xx/contiki-main.c +++ b/platform/srf06-cc26xx/contiki-main.c @@ -59,6 +59,7 @@ #include "uart.h" #include "sys/clock.h" #include "sys/rtimer.h" +#include "sys/node-id.h" #include "lib/sensors.h" #include "button-sensor.h" #include "dev/serial-line.h" @@ -68,6 +69,8 @@ #include /*---------------------------------------------------------------------------*/ +unsigned short node_id = 0; +/*---------------------------------------------------------------------------*/ /** \brief Board specific iniatialisation */ void board_init(void); /*---------------------------------------------------------------------------*/ @@ -123,6 +126,10 @@ set_rf_params(void) printf("%02x\n", linkaddr_node_addr.u8[i]); } #endif + + /* also set the global node id */ + node_id = short_addr; + printf(" Node ID: %d\n", node_id); } /*---------------------------------------------------------------------------*/ /**