[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/tos/lib/CC2420Radio ClientM.nc, 1.2, 1.3

steve ayer ayer1 at users.sourceforge.net
Mon Jun 25 11:59:24 PDT 2007


Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/lib/CC2420Radio
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29213

Modified Files:
	ClientM.nc 
Log Message:

when radio is shut down, (via ipstdcontrol.stop) its state is
preserved, which leaves it confused when powered back up (via
ipstdcontrol.start()), because it has really been IDLE

added switchClientState(CLIENT_STATE_IDLE); to stdcontrol.stop().  it
now resumes normal behaviour after a restart.

Index: ClientM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/lib/CC2420Radio/ClientM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ClientM.nc	18 Aug 2005 12:15:30 -0000	1.2
--- ClientM.nc	25 Jun 2007 18:59:20 -0000	1.3
***************
*** 123,126 ****
--- 123,128 ----
    };
  
+   void switchClientState(int newState);
+ 
    /*
     * Snooze functions handle how long we put the radio to sleep before requesting more data
***************
*** 215,219 ****
    command result_t StdControl.init() {
      call MessagePool.init();
!     call Leds.init();
      call RadioStdControl.init();
  
--- 217,221 ----
    command result_t StdControl.init() {
      call MessagePool.init();
!     //    call Leds.init();
      call RadioStdControl.init();
  
***************
*** 233,236 ****
--- 235,239 ----
      call Timer.stop();
      call AutoReScanTimer.stop();
+     switchClientState(CLIENT_STATE_IDLE);
      return call RadioStdControl.stop();
    }



More information about the Tinyos-contrib-commits mailing list