Update of /cvsroot/playerstage/code/player/server/drivers/mixed/khepera
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11860/server/drivers/mixed/khepera
Modified Files:
Tag: b_thjc_dynamic_arrays
khepera.cc .cvsignore
Log Message:
dynamic array changes to drivers compile, still needs testing
added lots more .cvsignore settings for eclipse
Index: .cvsignore
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/khepera/.cvsignore,v
retrieving revision 1.1.16.1
retrieving revision 1.1.16.2
diff -C2 -d -r1.1.16.1 -r1.1.16.2
*** .cvsignore 10 Oct 2007 09:26:13 -0000 1.1.16.1
--- .cvsignore 19 Oct 2007 21:58:56 -0000 1.1.16.2
***************
*** 4,5 ****
--- 4,7 ----
*.la
*.a
+ .libs
+ *.lo
Index: khepera.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/khepera/khepera.cc,v
retrieving revision 1.19.2.1
retrieving revision 1.19.2.2
diff -C2 -d -r1.19.2.1 -r1.19.2.2
*** khepera.cc 14 Oct 2007 04:41:46 -0000 1.19.2.1
--- khepera.cc 19 Oct 2007 21:58:56 -0000 1.19.2.2
***************
*** 123,126 ****
--- 123,127 ----
#include <libplayercore/playercore.h>
+ #include <libplayerxdr/playerxdr.h>
// we need to debug different things at different times
***************
*** 341,345 ****
}
! Khepera::~Khepera
{
delete geometry->ir.poses;
--- 342,346 ----
}
! Khepera::~Khepera()
{
delete geometry->ir.poses;
***************
*** 497,502 ****
ir_data.ranges_count = geometry->ir.poses_count;
ir_data.voltages_count = geometry->ir.poses_count;
! ir_data.ranges = new double[ir_data.ranges_count];
! ir_data.voltages = new double[ir_data.voltages_count];
UpdatePosData(&position_data);
--- 498,503 ----
ir_data.ranges_count = geometry->ir.poses_count;
ir_data.voltages_count = geometry->ir.poses_count;
! ir_data.ranges = new float[ir_data.ranges_count];
! ir_data.voltages = new float[ir_data.voltages_count];
UpdatePosData(&position_data);
***************
*** 643,652 ****
Khepera::ReadAllIR(player_ir_data_t* d)
{
! int Values[PLAYER_IR_MAX_SAMPLES];
!
! // changed these variable-size array declarations to the
! // bigger-than-necessary ones above, because older versions of gcc don't
! // support variable-size arrays.
if(Serial->KheperaCommand('N',0,NULL,geometry->ir.poses_count,Values) < 0)
return -1;
--- 644,650 ----
Khepera::ReadAllIR(player_ir_data_t* d)
{
! int * Values;
+ Values = new int [geometry->ir.poses_count];
if(Serial->KheperaCommand('N',0,NULL,geometry->ir.poses_count,Values) < 0)
return -1;
***************
*** 655,658 ****
--- 653,657 ----
d->voltages[i] = static_cast<short> (Values[i]);
}
+ delete [] Values;
return 0;
}
-------------------------------------------------------------------------
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