diff --git a/examples/ipv6/rpl-collect/Makefile b/examples/ipv6/rpl-collect/Makefile index c2e7875ef..e37b71468 100644 --- a/examples/ipv6/rpl-collect/Makefile +++ b/examples/ipv6/rpl-collect/Makefile @@ -7,6 +7,10 @@ WITH_UIP6=1 UIP_CONF_IPV6=1 CFLAGS+= -DUIP_CONF_IPV6_RPL +ifdef PERIOD +CFLAGS=-DPERIOD=$(PERIOD) +endif + all: $(CONTIKI_PROJECT) include $(CONTIKI)/Makefile.include diff --git a/examples/ipv6/rpl-collect/collect-common.c b/examples/ipv6/rpl-collect/collect-common.c index f0257df51..aa5bcf5d8 100644 --- a/examples/ipv6/rpl-collect/collect-common.c +++ b/examples/ipv6/rpl-collect/collect-common.c @@ -49,8 +49,10 @@ static unsigned long time_offset; static int send_active = 1; +#ifndef PERIOD #define PERIOD 60 -#define RANDWAIT 60 +#endif +#define RANDWAIT (PERIOD) /*---------------------------------------------------------------------------*/ PROCESS(collect_common_process, "collect common process");