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

Modified Files:
      Tag: b_thjc_dynamic_arrays
        .cvsignore erratic.cc 
Log Message:
dynamic array changes to drivers compile, still needs testing
added lots more .cvsignore settings for eclipse

Index: erratic.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/erratic/erratic.cc,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -d -r1.16.2.1 -r1.16.2.2
*** erratic.cc  14 Oct 2007 04:41:48 -0000      1.16.2.1
--- erratic.cc  19 Oct 2007 21:58:58 -0000      1.16.2.2
***************
*** 174,177 ****
--- 174,178 ----
  
  #include "erratic.h"
+ #include <libplayerxdr/playerxdr.h>
  
  #ifdef HAVE_CONFIG_H
***************
*** 820,829 ****
                                {
                                        erratic_data.aio.voltages_count = 
packet.packet[4];
!                                       erratic_data.aio.voltages = new 
double[erratic_data.aio.voltages_count];
                                }
                                if (erratic_data.ir.voltages_count-4 != 
RobotParams[this->param_idx]->NumIR)
                                {
                                        erratic_data.ir.voltages_count = 
RobotParams[this->param_idx]->NumIR;
!                                       erratic_data.ir.voltages = new 
double[erratic_data.ir.voltages_count+4];
                                }
                                else
--- 821,830 ----
                                {
                                        erratic_data.aio.voltages_count = 
packet.packet[4];
!                                       erratic_data.aio.voltages = new 
float[erratic_data.aio.voltages_count];
                                }
                                if (erratic_data.ir.voltages_count-4 != 
RobotParams[this->param_idx]->NumIR)
                                {
                                        erratic_data.ir.voltages_count = 
RobotParams[this->param_idx]->NumIR;
!                                       erratic_data.ir.voltages = new 
float[erratic_data.ir.voltages_count+4];
                                }
                                else
***************
*** 833,843 ****
                                {
                                        erratic_data.ir.ranges_count = 
RobotParams[this->param_idx]->NumIR;
!                                       erratic_data.ir.ranges = new 
double[erratic_data.ir.ranges_count];
                                }
                                unsigned int i_voltage;
                                for (i_voltage = 0; i_voltage < 
erratic_data.aio.voltages_count ;i_voltage++) 
                                        {
-                                               if (i_voltage >= 
PLAYER_AIO_MAX_INPUTS)
-                                                       continue;
                                                
erratic_data.aio.voltages[i_voltage] = (packet.packet[5+i_voltage*2]
                                                                        + 
256*packet.packet[6+i_voltage*2]) * (1.0 / 1024.0) * CPU_VOLTAGE;
--- 834,842 ----
                                {
                                        erratic_data.ir.ranges_count = 
RobotParams[this->param_idx]->NumIR;
!                                       erratic_data.ir.ranges = new 
float[erratic_data.ir.ranges_count];
                                }
                                unsigned int i_voltage;
                                for (i_voltage = 0; i_voltage < 
erratic_data.aio.voltages_count ;i_voltage++) 
                                        {
                                                
erratic_data.aio.voltages[i_voltage] = (packet.packet[5+i_voltage*2]
                                                                        + 
256*packet.packet[6+i_voltage*2]) * (1.0 / 1024.0) * CPU_VOLTAGE;
***************
*** 851,856 ****
                                for (int i=0; i < 4; i++) 
                                        {
-                                               if (i_voltage >= 
PLAYER_AIO_MAX_INPUTS)
-                                                       continue;
                                                
erratic_data.aio.voltages[i_voltage+i] = 
                                                        
(packet.packet[5+i_voltage*2] & (0x1 << i+4)) ? 1.0 : 0.0;
--- 850,853 ----
***************
*** 1242,1246 ****
                player_ir_pose_t pose;
                pose.poses_count = RobotParams[param_idx]->NumIR;
!               pose.poses = new player_pose3d_t[pose.poses_count]
                for (uint16_t i = 0; i < pose.poses_count ;i++)
                        pose.poses[i] = RobotParams[param_idx]->IRPose[i];
--- 1239,1243 ----
                player_ir_pose_t pose;
                pose.poses_count = RobotParams[param_idx]->NumIR;
!               pose.poses = new player_pose3d_t[pose.poses_count];
                for (uint16_t i = 0; i < pose.poses_count ;i++)
                        pose.poses[i] = RobotParams[param_idx]->IRPose[i];

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/erratic/.cvsignore,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -d -r1.1.4.1 -r1.1.4.2
*** .cvsignore  10 Oct 2007 09:26:12 -0000      1.1.4.1
--- .cvsignore  19 Oct 2007 21:58:58 -0000      1.1.4.2
***************
*** 3,4 ****
--- 3,6 ----
  .deps
  *.la
+ .libs
+ *.lo


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

Reply via email to