Update of /cvsroot/playerstage/code/player/utils/playerjoy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14234/utils/playerjoy

Modified Files:
      Tag: release-2-0-patches
        playerjoy.cc 
Log Message:
merged car-like command and set/reset odom support for obot driver from HEAD; 
added -dev jsdev arg to playerjoy

Index: playerjoy.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/utils/playerjoy/playerjoy.cc,v
retrieving revision 1.35
retrieving revision 1.35.2.1
diff -C2 -d -r1.35 -r1.35.2.1
*** playerjoy.cc        28 Feb 2006 07:07:18 -0000      1.35
--- playerjoy.cc        21 Sep 2006 03:51:36 -0000      1.35.2.1
***************
*** 42,45 ****
--- 42,46 ----
  - -speed     : maximum linear speed (m/sec)
  - -turnspeed : maximum angular speed (deg/sec)
+ - -dev <dev> : Joystick device file (default /dev/js0)
  - <host:port> : connect to a Player on this host and port
  
***************
*** 111,114 ****
--- 112,116 ----
    "       -speed     : maximum linear speed (m/sec)\n" \
    "       -turnspeed : maximum angular speed (deg/sec)\n" \
+   "       -dev <dev> : joystick device file (default /dev/js0)\n" \
    "       <host:port> : connect to a Player on this host and port\n"
  
***************
*** 163,166 ****
--- 165,169 ----
  bool use_gripper = false;
  GripperProxy *gp = NULL;
+ ActArrayProxy *lp = NULL;
  
  // joystick fd
***************
*** 207,210 ****
--- 210,216 ----
  double max_speed = 0.500; // m/second
  double max_turn = DTOR(60); // rad/second
+ char jsdev[PATH_MAX]; // joystick device file
+ 
+ #define DEFAULT_DEV "/dev/js0"
  
  // this is the speed that the camera will pan when you press the
***************
*** 328,332 ****
      {
        puts("r/v : gripper open/close");
!       puts("t/b : gripper up/down");
      }
    puts("");
--- 334,338 ----
      {
        puts("r/v : gripper open/close");
!       puts("t/b : lift up/down");
      }
    puts("");
***************
*** 476,482 ****
--- 482,493 ----
        gp = new GripperProxy(player,0);
        assert(gp);
+       lp = new ActArrayProxy(player,0);
+       assert(lp);
      }
    else
+   {
      gp = NULL;
+     lp = NULL;
+   }
  
    // try a few reads
***************
*** 625,628 ****
--- 636,649 ----
      }
        }
+     else if( strcmp( argv[i], "-dev" ) == 0 )
+       {
+         if(i++ < argc)
+           strncpy(jsdev,argv[i],PATH_MAX);
+         else
+         {
+           puts(USAGE);
+           exit(-1);
+         }
+       }
  /*    else if( strcmp( argv[i], "-udp" ) == 0 )
        protocol = PLAYER_TRANSPORT_UDP;*/
***************
*** 647,651 ****
    {
  #if JOYSTICK_SUPPORT
!     jfd = open ("/dev/js0", O_RDONLY);
  
      if(jfd < 1)
--- 668,675 ----
    {
  #if JOYSTICK_SUPPORT
!     if(!strlen(jsdev))
!       jfd = open (DEFAULT_DEV, O_RDONLY);
!     else
!       jfd = open (jsdev, O_RDONLY);
  
      if(jfd < 1)


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to