[Tinyos-commits] CVS: tinyos-1.x/tos/lib/CC2420Radio CC2420RadioM.nc, 1.39, 1.40

Joe Polastre jpolastre at users.sourceforge.net
Tue Jul 26 11:07:25 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/CC2420Radio
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28904

Modified Files:
	CC2420RadioM.nc 
Log Message:
minor fix for 'zero-length' backoff values.
bug was uncovered during sensys paper writing, folding fix into main tree


Index: CC2420RadioM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** CC2420RadioM.nc	13 Jul 2005 18:57:32 -0000	1.39
--- CC2420RadioM.nc	26 Jul 2005 18:07:15 -0000	1.40
***************
*** 127,130 ****
--- 127,133 ----
     inline result_t setInitialTimer( uint16_t jiffy ) {
       stateTimer = TIMER_INITIAL;
+      if (jiffy == 0)
+        // set the minimum timer time
+        return call BackoffTimerJiffy.setOneShot(2);
       return call BackoffTimerJiffy.setOneShot(jiffy);
     }
***************
*** 132,135 ****
--- 135,141 ----
     inline result_t setBackoffTimer( uint16_t jiffy ) {
       stateTimer = TIMER_BACKOFF;
+      if (jiffy == 0)
+        // set the minimum timer time
+        return call BackoffTimerJiffy.setOneShot(2);
       return call BackoffTimerJiffy.setOneShot(jiffy);
     }



More information about the Tinyos-commits mailing list