From 115b3a7c5cb4e3962c580a2757c6f43db9b33f87 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Wed, 17 Mar 2010 18:24:06 +0000 Subject: [PATCH] Minor timing bugfix: the time between channel checks should not include the time required for the channel check itself --- core/net/mac/contikimac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/net/mac/contikimac.c b/core/net/mac/contikimac.c index 50c92152a..28475ad64 100644 --- a/core/net/mac/contikimac.c +++ b/core/net/mac/contikimac.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: contikimac.c,v 1.14 2010/03/17 16:35:52 adamdunkels Exp $ + * $Id: contikimac.c,v 1.15 2010/03/17 18:24:06 adamdunkels Exp $ */ /** @@ -103,7 +103,7 @@ struct announcement_msg { #define CCA_COUNT_MAX 2 #define CCA_CHECK_TIME RTIMER_ARCH_SECOND / 8192 -#define CCA_SLEEP_TIME RTIMER_ARCH_SECOND / 2000 + CCA_CHECK_TIME +#define CCA_SLEEP_TIME RTIMER_ARCH_SECOND / 2000 #define CHECK_TIME (CCA_COUNT_MAX * (CCA_CHECK_TIME + CCA_SLEEP_TIME)) #define STREAM_CCA_COUNT (CYCLE_TIME / (CCA_SLEEP_TIME + CCA_CHECK_TIME) - CCA_COUNT_MAX)