Update of /cvsroot/playerstage/code/player/server/drivers/mixed/p2os
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31322/server/drivers/mixed/p2os

Modified Files:
        p2os.cc 
Log Message:
applied Reed's patches to fix p2os gripper support and add gripper teleop to 
playerv

Index: p2os.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/p2os/p2os.cc,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** p2os.cc     6 Nov 2006 16:42:58 -0000       1.77
--- p2os.cc     3 Jan 2007 19:13:21 -0000       1.78
***************
*** 3012,3017 ****
      if (cmd.position <= 0.0)
      {
!       command[2] = GRIPPER;
!       command[3] = LIFTdown;
        packet.Build (command, 4);
        SendReceive (&packet);
--- 3012,3017 ----
      if (cmd.position <= 0.0)
      {
!      command[2] = LIFTdown;
!      command[3] = 0;
        packet.Build (command, 4);
        SendReceive (&packet);
***************
*** 3019,3024 ****
      else if (cmd.position >= 1.0)
      {
-       command[2] = GRIPPER;
        command[3] = LIFTup;
        packet.Build (command, 4);
        SendReceive (&packet);
--- 3019,3024 ----
      else if (cmd.position >= 1.0)
      {
        command[3] = LIFTup;
+      command[3] = 0;
        packet.Build (command, 4);
        SendReceive (&packet);
***************
*** 3045,3050 ****
  
        // Send the LIFTcarry command
!       command[2] = GRIPPER;
!       command[3] = LIFTcarry;
        packet.Build (command, 4);
        SendReceive (&packet);
--- 3045,3050 ----
  
        // Send the LIFTcarry command
!      command[2] = LIFTcarry;
!      command[3] = 0;
        packet.Build (command, 4);
        SendReceive (&packet);
***************
*** 3071,3076 ****
      command[0] = GRIPPER;
      command[1] = ARGINT;
!     command[2] = GRIPPER;
!     command[3] = LIFTup;
      packet.Build (command, 4);
      SendReceive (&packet);
--- 3071,3076 ----
      command[0] = GRIPPER;
      command[1] = ARGINT;
!    command[2] = LIFTup;
!    command[3] = 0;
      packet.Build (command, 4);
      SendReceive (&packet);
***************
*** 3090,3100 ****
    P2OSPacket packet;
  
    if (sentGripperCmd && lastGripperCmd == PLAYER_GRIPPER_CMD_OPEN)
      return;
  
    cmd[0] = GRIPPER;
    cmd[1] = ARGINT;
!   cmd[2] = GRIPPER;
!   cmd[3] = GRIPopen;
    packet.Build (cmd, 4);
    SendReceive (&packet);
--- 3090,3102 ----
    P2OSPacket packet;
  
+  /*
    if (sentGripperCmd && lastGripperCmd == PLAYER_GRIPPER_CMD_OPEN)
      return;
+  */
  
    cmd[0] = GRIPPER;
    cmd[1] = ARGINT;
!  cmd[2] = GRIPopen;  // low bits of unsigned 16bit int
!  cmd[3] = 0;         // high bits of unsigned 16bit int
    packet.Build (cmd, 4);
    SendReceive (&packet);
***************
*** 3109,3119 ****
    P2OSPacket packet;
  
    if (sentGripperCmd && lastGripperCmd == PLAYER_GRIPPER_CMD_CLOSE)
      return;
  
    cmd[0] = GRIPPER;
    cmd[1] = ARGINT;
!   cmd[2] = GRIPPER;
!   cmd[3] = GRIPclose;
    packet.Build (cmd, 4);
    SendReceive (&packet);
--- 3111,3123 ----
    P2OSPacket packet;
  
+  /*
    if (sentGripperCmd && lastGripperCmd == PLAYER_GRIPPER_CMD_CLOSE)
      return;
+  */
  
    cmd[0] = GRIPPER;
    cmd[1] = ARGINT;
!  cmd[2] = GRIPclose; // low bits of unsigned 16 bit int
!  cmd[3] = 0;         // high bits of unsigned 16bit int
    packet.Build (cmd, 4);
    SendReceive (&packet);
***************
*** 3133,3138 ****
    cmd[0] = GRIPPER;
    cmd[1] = ARGINT;
!   cmd[2] = GRIPPER;
!   cmd[3] = GRIPstop;
    packet.Build (cmd, 4);
    SendReceive (&packet);
--- 3137,3142 ----
    cmd[0] = GRIPPER;
    cmd[1] = ARGINT;
!  cmd[2] = GRIPstop;
!  cmd[3] = 0;
    packet.Build (cmd, 4);
    SendReceive (&packet);


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