Make PERIOD configurable in Makefile
This commit is contained in:
parent
3caf77a60b
commit
912ea85199
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue