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

Modified Files:
      Tag: release-2-0-patches
        laserobstacleavoid.cc 
Log Message:
merged client-side laser min-left / min-right fixes from HEAD

Index: laserobstacleavoid.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/examples/libplayerc++/laserobstacleavoid.cc,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** laserobstacleavoid.cc       1 Mar 2006 23:08:54 -0000       1.5
--- laserobstacleavoid.cc       5 Dec 2007 21:57:34 -0000       1.5.2.1
***************
*** 37,58 ****
        double newspeed = 0;
        double newturnrate = 0;
-       double minR = 1e9;
-       double minL = 1e9;
  
        // this blocks until new data comes; 10Hz by default
        robot.Read();
  
        // laser avoid (stolen from esben's java example)
-       uint count = lp.GetCount();
-       for (uint j=0; j < count/2; ++j)
-       {
-         if (minR > lp[j])
-           minR = lp[j];
-       }
-       for (uint j = count/2; j < count; ++j)
-       {
-         if (minL > lp[j])
-           minL = lp[j];
-       }
        std::cout << "minR: " << minR
                  << "minL: " << minL
--- 37,48 ----
        double newspeed = 0;
        double newturnrate = 0;
  
        // this blocks until new data comes; 10Hz by default
        robot.Read();
  
+       double minR = lp.GetMinRight();
+       double minL = lp.GetMinLeft();
+ 
        // laser avoid (stolen from esben's java example)
        std::cout << "minR: " << minR
                  << "minL: " << minL


-------------------------------------------------------------------------
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