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

Modified Files:
        Makefile.am test.cc test.h 
Added Files:
        test_ranger.cc 
Log Message:
added geoffs ranger interface


Index: test.h
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/test/test.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test.h      19 Apr 2007 16:59:45 -0000      1.8
--- test.h      20 May 2007 00:30:15 -0000      1.9
***************
*** 64,67 ****
--- 64,68 ----
  int test_actarray(PlayerClient* client, int index);
  int test_aio(PlayerClient* client, int index);
+ int test_ranger(PlayerClient* client, int index);
  
  //int test_bps(PlayerClient* client, int index);

--- NEW FILE: test_ranger.cc ---
#include "test.h"
#include <unistd.h>

int
test_ranger(PlayerClient* client, int index)
{
  TEST("ranger");
  RangerProxy rp(client,index);

  // wait for P2OS to start up, throwing away data as fast as possible
  for(int i=0; i < 60; i++)
  {
    client->Read();
  }

  rp.RequestGeom();

  std::cout << "There are " << rp.GetSensorCount() << " individual range 
sensors.\n";

  for(int t = 0; t < 3; t++)
  {
    TEST1("reading data (attempt %d)", t);

    client->Read();

    PASS();
    std::cout << rp << std::endl;

  }

  PASS();
  return 0;
}


Index: test.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/test/test.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test.cc     19 Apr 2007 16:59:45 -0000      1.7
--- test.cc     20 May 2007 00:30:14 -0000      1.8
***************
*** 69,72 ****
--- 69,73 ----
          "  aio\n"\
          "  speech\n"\
+         "  ranger\n"\
          "  position2d-subscribe  (subscribe to position2d indefinitely)\n"\
          "  gripper-subscribe     (subscribe to gripper indefinitely)\n"\
***************
*** 236,239 ****
--- 237,243 ----
          test_aio(&client, index);
  
+       if(strcmp(device, "ranger") == 0 || strcmp(device, "all") == 0)
+         test_ranger(&client, index);
+ 
  
      } catch(std::exception& e) {

Index: Makefile.am
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/client_libs/libplayerc++/test/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Makefile.am 19 Apr 2007 16:59:44 -0000      1.17
--- Makefile.am 20 May 2007 00:30:14 -0000      1.18
***************
*** 41,45 ****
                 test_actarray.cc \
                 test_aio.cc \
!                test_speech.cc 
  
  
--- 41,46 ----
                 test_actarray.cc \
                 test_aio.cc \
!                test_speech.cc \
!                test_ranger.cc
  
  


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to