Update of /cvsroot/playerstage/code/player/server/drivers/mixed/p2os
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22298/server/drivers/mixed/p2os
Modified Files:
p2os.cc
Log Message:
Updated python bindings to handle arrays of floats correctly. Added support for
multi_pos actarray command to p2os driver.
Index: p2os.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/p2os/p2os.cc,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -d -r1.79 -r1.80
*** p2os.cc 31 Jan 2007 21:20:30 -0000 1.79
--- p2os.cc 20 Mar 2007 07:30:42 -0000 1.80
***************
*** 2076,2079 ****
--- 2076,2080 ----
// Act array caps
HANDLE_CAPABILITY_REQUEST (actarray_id, resp_queue, hdr, data,
PLAYER_MSGTYPE_CMD, PLAYER_ACTARRAY_POS_CMD);
+ HANDLE_CAPABILITY_REQUEST (actarray_id, resp_queue, hdr, data,
PLAYER_MSGTYPE_CMD, PLAYER_ACTARRAY_MULTI_POS_CMD);
HANDLE_CAPABILITY_REQUEST (actarray_id, resp_queue, hdr, data,
PLAYER_MSGTYPE_CMD, PLAYER_ACTARRAY_HOME_CMD);
HANDLE_CAPABILITY_REQUEST (actarray_id, resp_queue, hdr, data,
PLAYER_MSGTYPE_REQ, PLAYER_ACTARRAY_POWER_REQ);
***************
*** 2764,2768 ****
int P2OS::HandleActArrayCommand (player_msghdr * hdr, void * data)
{
!
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_POS_CMD,this->actarray_id))
{
player_actarray_position_cmd_t cmd;
--- 2765,2769 ----
int P2OS::HandleActArrayCommand (player_msghdr * hdr, void * data)
{
! if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_CMD,
PLAYER_ACTARRAY_POS_CMD, this->actarray_id))
{
player_actarray_position_cmd_t cmd;
***************
*** 2772,2776 ****
return 0;
}
! else
if(Message::MatchMessage(hdr,PLAYER_MSGTYPE_CMD,PLAYER_ACTARRAY_HOME_CMD,this->actarray_id))
{
player_actarray_home_cmd_t cmd;
--- 2773,2777 ----
return 0;
}
! else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_CMD,
PLAYER_ACTARRAY_HOME_CMD, this->actarray_id))
{
player_actarray_home_cmd_t cmd;
***************
*** 2780,2783 ****
--- 2781,2797 ----
return 0;
}
+ else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_CMD,
PLAYER_ACTARRAY_MULTI_POS_CMD, this->actarray_id))
+ {
+ player_actarray_multi_position_cmd_t cmd =
*(player_actarray_multi_position_cmd_t*) data;
+ player_actarray_position_cmd_t singleCmd;
+ for (int ii = 0; ii < cmd.positions_count && ii < 6; ii++)
+ {
+ singleCmd.joint = ii;
+ singleCmd.position = cmd.positions[ii];
+ this->HandleActArrayPosCmd (singleCmd);
+ }
+ lastActArrayCmd = PLAYER_ACTARRAY_MULTI_POS_CMD;
+ }
+
return -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