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

steve ayer ayer1 at users.sourceforge.net
Tue Mar 27 10:37:36 PDT 2007


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

Modified Files:
	RovingNetworksM.nc 
Log Message:

in runSetCommands: restored return conditional at top when application
doesn't request any configuration commands.

also, added conditional for performing resetdefaults; this was missed
earlier and always ran.

changed soon-to-be-removed pool_for_fifty_msec loop terminus to 10
from 100, so that it stops after 50 msec 

added 15ms delay in stdcontrol.start() to fix subtle timing bug seen only by
me: without delay, occasionally the rovingnetworks module would fail
to respond to '$$$' string, though no other functionality was
hindered, but configuration fails.

Index: RovingNetworksM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/lib/RovingNetworks/RovingNetworksM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RovingNetworksM.nc	19 Mar 2007 19:21:50 -0000	1.2
--- RovingNetworksM.nc	27 Mar 2007 17:37:34 -0000	1.3
***************
*** 139,143 ****
      register uint8_t i;
      
!     for(i = 0; i < 100; i++)
        TOSH_uwait(5000);
  
--- 139,143 ----
      register uint8_t i;
      
!     for(i = 0; i < 10; i++)
        TOSH_uwait(5000);
  
***************
*** 214,218 ****
  
      // if we're in default mode, don't even go to cmd mode
-     /*
      if(!radioMode &&     
         discoverable &&
--- 214,217 ----
***************
*** 220,228 ****
         !setNameRequest &&
         !setPINRequest &&
         !encrypt){
        signal Bluetooth.commandModeEnded();
        return;
      }
!     */
      switch(setupStep) {
      case 0:
--- 219,230 ----
         !setNameRequest &&
         !setPINRequest &&
+        !setSvcClassRequest &&
+        !setDevClassRequest &&
+        !resetDefaultsRequest &&
         !encrypt){
        signal Bluetooth.commandModeEnded();
        return;
      }
! 
      switch(setupStep) {
      case 0:
***************
*** 233,238 ****
        setupStep++;
        // reset factory defaults
!       writeCommand("SF,1\r", "AOK");
!       break;
      case 2:
        setupStep++;
--- 235,242 ----
        setupStep++;
        // reset factory defaults
!       if(resetDefaultsRequest){
! 	writeCommand("SF,1\r", "AOK");
! 	break;
!       }
      case 2:
        setupStep++;
***************
*** 339,342 ****
--- 343,347 ----
      call TimerControl.start();
  
+     TOSH_uwait(15000);
      post runSetCommands();
  



More information about the Tinyos-contrib-commits mailing list