Update of /cvsroot/playerstage/code/player/server/drivers/mixed/sr3000
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10946/server/drivers/mixed/sr3000
Modified Files:
sr3000.cc
Log Message:
applied Toby's patch to replace fixed-size arrays
Index: sr3000.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/sr3000/sr3000.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sr3000.cc 23 Aug 2007 19:58:46 -0000 1.4
--- sr3000.cc 1 Nov 2007 22:16:21 -0000 1.5
***************
*** 524,527 ****
--- 524,528 ----
pcloud_data.points_count = rows * cols;
+ pcloud_data.points = new
player_pointcloud3d_element_t[pcloud_data.points_count];
for (i = 0; i < rows*cols; i++)
{
***************
*** 541,544 ****
--- 542,546 ----
&pcloud_data, 4 + pcloud_data.points_count*sizeof
(player_pointcloud3d_element_t),
NULL);
+ delete [] pcloud_data.points;
}
***************
*** 554,558 ****
d_cam_data.compression = PLAYER_CAMERA_COMPRESS_RAW;
d_cam_data.image_count = rows*cols*2;
! memcpy (d_cam_data.image, (unsigned char*)buffer, rows*cols*2);
// Write the distance camera data
--- 556,561 ----
d_cam_data.compression = PLAYER_CAMERA_COMPRESS_RAW;
d_cam_data.image_count = rows*cols*2;
! d_cam_data.image = buffer;
! //memcpy (d_cam_data.image, (unsigned char*)buffer, rows*cols*2);
// Write the distance camera data
***************
*** 571,575 ****
i_cam_data.compression = PLAYER_CAMERA_COMPRESS_RAW;
i_cam_data.image_count = rows*cols*2;
! memcpy (i_cam_data.image, (unsigned char*)buffer + buffer_size/2,
rows*cols*2);
// Write the intensity camera data
--- 574,579 ----
i_cam_data.compression = PLAYER_CAMERA_COMPRESS_RAW;
i_cam_data.image_count = rows*cols*2;
! i_cam_data.image = (unsigned char*)buffer + buffer_size/2;
! //memcpy (i_cam_data.image, (unsigned char*)buffer + buffer_size/2,
rows*cols*2);
// Write the intensity camera data
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit