[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420/lpl DefaultLplP.nc, 1.1, 1.2

dmm rincon at users.sourceforge.net
Fri Jul 6 20:35:19 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/lpl
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv371

Modified Files:
	DefaultLplP.nc 
Log Message:
Fixed state issues causing LPL to not duty cycle properly; updated unit tests to test for this case

Index: DefaultLplP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/lpl/DefaultLplP.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DefaultLplP.nc	4 Jul 2007 00:37:15 -0000	1.1
--- DefaultLplP.nc	7 Jul 2007 03:35:17 -0000	1.2
***************
*** 84,92 ****
  
    /**
!    * Radio State
     */
    enum {
!     S_OFF,
      S_ON,
    };
    
--- 84,94 ----
  
    /**
!    * Radio Power State
     */
    enum {
!     S_OFF, // off by default
!     S_TURNING_ON,
      S_ON,
+     S_TURNING_OFF,
    };
    
***************
*** 348,354 ****
      // the channel.
      
!     if(call SendState.isIdle()) {
!       startOffTimer();
!     }
    }
    
--- 350,354 ----
      // the channel.
      
!     startOffTimer();
    }
    
***************
*** 427,430 ****
--- 427,432 ----
    /***************** Timer Events ****************/
    event void OffTimer.fired() {
+     call Leds.led1Toggle();
+     
      /*
       * Only stop the radio if the radio is supposed to be off permanently
***************
*** 433,437 ****
      if(call SplitControlState.getState() == S_OFF
          || (call PowerCycle.getSleepInterval() > 0
!             && call SplitControlState.getState() == S_ON
                  && call SendState.getState() == S_LPL_NOT_SENDING)) { 
        post stopRadio();
--- 435,439 ----
      if(call SplitControlState.getState() == S_OFF
          || (call PowerCycle.getSleepInterval() > 0
!             && call SplitControlState.getState() != S_OFF
                  && call SendState.getState() == S_LPL_NOT_SENDING)) { 
        post stopRadio();



More information about the Tinyos-2-commits mailing list