Make PERIOD configurable in Makefile

This commit is contained in:
maniacbug 2011-08-09 00:30:10 -04:00 committed by David Kopf
parent 3caf77a60b
commit 912ea85199
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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");