Update of /cvsroot/playerstage/code/player/examples/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28584/examples/libplayerc++

Modified Files:
        randomwalk.cc 
Log Message:
stopped random walk seg faulting before sonar data arrived


Index: randomwalk.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/randomwalk.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** randomwalk.cc       24 Oct 2007 22:32:03 -0000      1.4
--- randomwalk.cc       3 Dec 2007 04:29:45 -0000       1.5
***************
*** 32,38 ****
--- 32,52 ----
  
      if (gUseLaser)
+     {
        lp = new LaserProxy (&robot, gIndex);
+       // make sure we get some data
+       while(lp->GetCount() == 0)
+       {
+         robot.Read();
+       }
+     }
      else
+     {
        sp = new SonarProxy (&robot, gIndex);
+       // make sure we get some data
+       while(sp->GetCount() == 0)
+       {
+         robot.Read();
+       }
+     }
  
      std::cout << robot << std::endl;


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to