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
1 changed files with 10 additions and 3 deletions

View File

@ -33,7 +33,7 @@
*
* 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;
} c;
#define DEBUG 0
#if DEBUG
#include <stdio.h>
@ -199,9 +200,9 @@ new_announcement(uint16_t id, uint8_t has_value,
if(bump == ANNOUNCEMENT_BUMP) {
c.current_interval = c.initial_interval;
set_timers();
} else if(newval != oldval) {
/* } else if(newval != oldval) {
c.current_interval = c.min_interval;
set_timers();
set_timers();*/
}
}
/*---------------------------------------------------------------------------*/
@ -230,4 +231,10 @@ broadcast_announcement_stop(void)
broadcast_close(&c.c);
}
/*---------------------------------------------------------------------------*/
clock_time_t
broadcast_announcement_beacon_interval(void)
{
return c.current_interval;
}
/*---------------------------------------------------------------------------*/
/** @} */