Do not reduce transmission interval, unless explicitly told so with the bump flag

This commit is contained in:
adamdunkels 2010-10-11 23:43:01 +00:00
parent 37adf130b4
commit ec716ea62d

View file

@ -33,7 +33,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: broadcast-announcement.c,v 1.6 2010/06/16 10:10:10 nifi Exp $ * $Id: broadcast-announcement.c,v 1.7 2010/10/11 23:43:01 adamdunkels Exp $
*/ */
/** /**
@ -85,6 +85,7 @@ static struct broadcast_announcement_state {
uint16_t val; uint16_t val;
} c; } c;
#define DEBUG 0 #define DEBUG 0
#if DEBUG #if DEBUG
#include <stdio.h> #include <stdio.h>
@ -199,9 +200,9 @@ new_announcement(uint16_t id, uint8_t has_value,
if(bump == ANNOUNCEMENT_BUMP) { if(bump == ANNOUNCEMENT_BUMP) {
c.current_interval = c.initial_interval; c.current_interval = c.initial_interval;
set_timers(); set_timers();
} else if(newval != oldval) { /* } else if(newval != oldval) {
c.current_interval = c.min_interval; c.current_interval = c.min_interval;
set_timers(); set_timers();*/
} }
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -230,4 +231,10 @@ broadcast_announcement_stop(void)
broadcast_close(&c.c); broadcast_close(&c.c);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
clock_time_t
broadcast_announcement_beacon_interval(void)
{
return c.current_interval;
}
/*---------------------------------------------------------------------------*/
/** @} */ /** @} */