[Firebug-cvs] fireboard/beta/fireworks/apps/MultihopLinkEstimator Makefile,1.1,1.2 MultihopLinkEstim
Brought to you by:
doolin
From: Karthik D. <da...@us...> - 2005-08-10 04:43:28
|
Update of /cvsroot/firebug/fireboard/beta/fireworks/apps/MultihopLinkEstimator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27959 Modified Files: Makefile MultihopLinkEstimator.h MultihopLinkEstimatorM.nc Log Message: Updated Timer firing Index: MultihopLinkEstimatorM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/MultihopLinkEstimator/MultihopLinkEstimatorM.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultihopLinkEstimatorM.nc 8 Aug 2005 17:14:20 -0000 1.2 --- MultihopLinkEstimatorM.nc 8 Aug 2005 19:51:52 -0000 1.3 *************** *** 93,96 **** --- 93,102 ---- static void initialize() { + #ifdef LE_LEDS + call Leds.redOn(); + call Leds.greenOn(); + call Leds.yellowOn(); + #endif + timer_rate = INITIAL_TIMER_RATE; atomic gfSendBusy = FALSE; *************** *** 116,120 **** pReading->type = SURGE_TYPE_SENSORREADING; pReading->parentaddr = call RouteControl.getParent(); ! pReading->reading = gSensorData; pReading->seq_no = seqno++; --- 122,127 ---- pReading->type = SURGE_TYPE_SENSORREADING; pReading->parentaddr = call RouteControl.getParent(); ! // pReading->reading = gSensorData; ! pReading->reading = 13; pReading->seq_no = seqno++; *************** *** 132,136 **** pingMsg->seqno = ++pseqno; pingMsg->source = TOS_LOCAL_ADDRESS; ! #ifdef MHOP_LEDS call Leds.redOn(); #endif --- 139,143 ---- pingMsg->seqno = ++pseqno; pingMsg->source = TOS_LOCAL_ADDRESS; ! #ifdef LE_LEDS call Leds.redOn(); #endif *************** *** 146,150 **** if(call Send.getBuffer(&leMsg, &len) != NULL) { ! #ifdef MHOP_LEDS call Leds.yellowOn(); #endif --- 153,157 ---- if(call Send.getBuffer(&leMsg, &len) != NULL) { ! #ifdef LE_LEDS call Leds.yellowOn(); #endif *************** *** 166,170 **** call MacControl.enableAck(); ! randomtimer = (call Random.rand() & 0xffff) + 1; call LinkTimer.start(TIMER_ONE_SHOT, randomtimer); --- 173,177 ---- call MacControl.enableAck(); ! randomtimer = (call Random.rand() & 0xfff) + 1; call LinkTimer.start(TIMER_ONE_SHOT, randomtimer); *************** *** 199,203 **** uint16_t rtimer; ! post sendPing(); /* Choose a random number between (1-4096)ms and add it to 10000. Basically, choose a random number between --- 206,212 ---- uint16_t rtimer; ! #ifdef LE_LEDS ! call Leds.greenToggle(); ! #endif /* Choose a random number between (1-4096)ms and add it to 10000. Basically, choose a random number between *************** *** 206,209 **** --- 215,220 ---- rtimer = (call Random.rand() & 0x1fff) + 0x2710; call Timer.start(TIMER_ONE_SHOT, rtimer); + + post sendPing(); return SUCCESS; } *************** *** 227,231 **** PingMsg *pingMsg = (PingMsg *) &(m->data); ! #ifdef MHOP_LEDS call Leds.greenToggle(); #endif --- 238,242 ---- PingMsg *pingMsg = (PingMsg *) &(m->data); ! #ifdef LE_LEDS call Leds.greenToggle(); #endif *************** *** 256,260 **** event result_t SendPing.sendDone(TOS_MsgPtr m, result_t success) { dbg(DBG_USR2, "MultihopLinkEstimatorM: sent ping 0x%x\n", success); ! #ifdef MHOP_LEDS call Leds.redOff(); #endif --- 267,271 ---- event result_t SendPing.sendDone(TOS_MsgPtr m, result_t success) { dbg(DBG_USR2, "MultihopLinkEstimatorM: sent ping 0x%x\n", success); ! #ifdef LE_LEDS call Leds.redOff(); #endif *************** *** 265,269 **** event result_t SendLinkEstimate.sendDone(TOS_MsgPtr m, result_t success) { dbg(DBG_USR2, "MultihopLinkEstimatorM: sent ping 0x%x\n", success); ! #ifdef MHOP_LEDS call Leds.yellowOff(); #endif --- 276,280 ---- event result_t SendLinkEstimate.sendDone(TOS_MsgPtr m, result_t success) { dbg(DBG_USR2, "MultihopLinkEstimatorM: sent ping 0x%x\n", success); ! #ifdef LE_LEDS call Leds.yellowOff(); #endif Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/MultihopLinkEstimator/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 6 Aug 2005 21:54:20 -0000 1.1 --- Makefile 8 Aug 2005 19:51:51 -0000 1.2 *************** *** 1,3 **** ! PFLAGS= -I%T/lib/MultiHopLQI -DSEND_QUEUE_SIZE=8 -DMHOP_LEDS PLATFORMS=telos telosa telosb tmote --- 1,3 ---- ! PFLAGS= -I%T/lib/MultiHopLQI -DSEND_QUEUE_SIZE=8 -DLE_LEDS PLATFORMS=telos telosa telosb tmote Index: MultihopLinkEstimator.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/fireworks/apps/MultihopLinkEstimator/MultihopLinkEstimator.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultihopLinkEstimator.h 8 Aug 2005 17:14:13 -0000 1.2 --- MultihopLinkEstimator.h 8 Aug 2005 19:51:51 -0000 1.3 *************** *** 70,75 **** enum { AM_SURGEMSG = 17, ! AM_LINKESTIMATORMSG = 18, ! AM_PINGMSG = 19 }; --- 70,75 ---- enum { AM_SURGEMSG = 17, ! AM_LINKESTIMATORMSG = 20, ! AM_PINGMSG = 21 }; |