Update of /cvsroot/playerstage/code/player/server/drivers/mixed/rflex
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11860/server/drivers/mixed/rflex
Modified Files:
Tag: b_thjc_dynamic_arrays
rflex_configs.h .cvsignore rflex.cc
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/rflex/.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:08 -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: rflex.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex.cc,v
retrieving revision 1.39.2.1
retrieving revision 1.39.2.2
diff -C2 -d -r1.39.2.1 -r1.39.2.2
*** rflex.cc 14 Oct 2007 04:41:47 -0000 1.39.2.1
--- rflex.cc 19 Oct 2007 21:58:56 -0000 1.39.2.2
***************
*** 315,318 ****
--- 315,319 ----
#include <libplayercore/playercore.h>
+ #include <libplayerxdr/playerxdr.h>
extern PlayerTime* GlobalTime;
***************
*** 770,774 ****
for(int i=0; i < rflex_configs.ir_bank_count; ++i)
RunningTotal += (rflex_configs.ir_count[i]=(int)
cf->ReadTupleFloat(section, "rflex_banks",i,0));
!
// posecount is actually unnecasary, but for consistancy will juse use it
for error checking :)
if (RunningTotal != rflex_configs.ir_poses.poses_count)
--- 771,775 ----
for(int i=0; i < rflex_configs.ir_bank_count; ++i)
RunningTotal += (rflex_configs.ir_count[i]=(int)
cf->ReadTupleFloat(section, "rflex_banks",i,0));
! rflex_configs.ir_total_count = RunningTotal;
// posecount is actually unnecasary, but for consistancy will juse use it
for error checking :)
if (RunningTotal != rflex_configs.ir_poses.poses_count)
***************
*** 1174,1178 ****
player_dio_data_t_cleanup(&rflex_data.dio);
player_aio_data_t_cleanup(&rflex_data.aio);
! player_ir_data_cleanup(&rflex_data.ir);
Lock();
if (!ThreadAlive)
--- 1175,1179 ----
player_dio_data_t_cleanup(&rflex_data.dio);
player_aio_data_t_cleanup(&rflex_data.aio);
! player_ir_data_t_cleanup(&rflex_data.ir);
Lock();
if (!ThreadAlive)
***************
*** 1229,1242 ****
{
! int arb_ranges[PLAYER_SONAR_MAX_SAMPLES];
! char abumper_ranges[PLAYER_BUMPER_MAX_SAMPLES];
! unsigned char air_ranges[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.
! // int arb_ranges[rflex_configs.num_sonars];
! // char abumper_ranges[rflex_configs.bumper_count];
! // unsigned char air_ranges[rflex_configs.ir_poses.pose_count];
static int initialized = 0;
--- 1230,1236 ----
{
! int *arb_ranges = new int[rflex_configs.num_sonars];
! char *abumper_ranges = new char[rflex_configs.bumper_count];
! uint8_t *air_ranges = new uint8_t[rflex_configs.ir_total_count];
static int initialized = 0;
***************
*** 1309,1313 ****
d->sonar.ranges_count=rflex_configs.sonar_1st_bank_end;
delete [] d->sonar.ranges;
! d->sonar.ranges = new double[d->sonar.ranges_count];
}
for (i = 0; i < rflex_configs.sonar_1st_bank_end; i++){
--- 1303,1307 ----
d->sonar.ranges_count=rflex_configs.sonar_1st_bank_end;
delete [] d->sonar.ranges;
! d->sonar.ranges = new float[d->sonar.ranges_count];
}
for (i = 0; i < rflex_configs.sonar_1st_bank_end; i++){
***************
*** 1318,1322 ****
d->sonar2.ranges_count=(rflex_configs.num_sonars -
rflex_configs.sonar_2nd_bank_start);
delete [] d->sonar2.ranges;
! d->sonar2.ranges = new double[d->sonar2.ranges_count];
}
for (i = 0; i < rflex_configs.num_sonars -
rflex_configs.sonar_2nd_bank_start; i++){
--- 1312,1316 ----
d->sonar2.ranges_count=(rflex_configs.num_sonars -
rflex_configs.sonar_2nd_bank_start);
delete [] d->sonar2.ranges;
! d->sonar2.ranges = new float[d->sonar2.ranges_count];
}
for (i = 0; i < rflex_configs.num_sonars -
rflex_configs.sonar_2nd_bank_start; i++){
***************
*** 1336,1340 ****
d->bumper.bumpers_count=(a_num_bumpers);
! d->bumper.bumpers = a_num_bumpers;
}
--- 1330,1334 ----
d->bumper.bumpers_count=(a_num_bumpers);
! d->bumper.bumpers = (uint8_t*)abumper_ranges;
}
***************
*** 1355,1360 ****
delete [] d->ir.ranges;
delete [] d->ir.voltages;
! d->ir.ranges = new double [a_num_ir];
! d->ir.voltages = new double [a_num_ir];
}
for (int i = 0; i < a_num_ir; ++i)
--- 1349,1354 ----
delete [] d->ir.ranges;
delete [] d->ir.voltages;
! d->ir.ranges = new float [a_num_ir];
! d->ir.voltages = new float [a_num_ir];
}
for (int i = 0; i < a_num_ir; ++i)
Index: rflex_configs.h
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/mixed/rflex/rflex_configs.h,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C2 -d -r1.14 -r1.14.2.1
*** rflex_configs.h 9 Jul 2007 17:18:01 -0000 1.14
--- rflex_configs.h 19 Oct 2007 21:58:56 -0000 1.14.2.1
***************
*** 96,99 ****
--- 96,100 ----
int ir_base_bank;
int ir_bank_count;
+ int ir_total_count;
int * ir_count;
double * ir_a;
-------------------------------------------------------------------------
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