Make sure that the cycle timing is exact
This commit is contained in:
parent
e4cf633215
commit
af21afa750
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: contikimac.c,v 1.43 2010/12/07 23:12:54 adamdunkels Exp $
|
* $Id: contikimac.c,v 1.44 2010/12/10 13:36:06 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -315,12 +315,14 @@ powercycle(struct rtimer *t, void *ptr)
|
||||||
{
|
{
|
||||||
PT_BEGIN(&pt);
|
PT_BEGIN(&pt);
|
||||||
|
|
||||||
|
cycle_start = RTIMER_NOW();
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
static uint8_t packet_seen;
|
static uint8_t packet_seen;
|
||||||
static rtimer_clock_t t0;
|
static rtimer_clock_t t0;
|
||||||
static uint8_t count;
|
static uint8_t count;
|
||||||
|
|
||||||
cycle_start = RTIMER_NOW();
|
cycle_start += CYCLE_TIME;
|
||||||
|
|
||||||
if(WITH_STREAMING && is_streaming) {
|
if(WITH_STREAMING && is_streaming) {
|
||||||
#if NURTIMER
|
#if NURTIMER
|
||||||
|
|
Loading…
Reference in a new issue