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

Modified Files:
        robotino_driver.cc 
Log Message:
applied Toby's patch to replace fixed-size arrays

Index: robotino_driver.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/robotino/robotino_driver.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** robotino_driver.cc  23 Aug 2007 19:58:46 -0000      1.4
--- robotino_driver.cc  1 Nov 2007 22:16:21 -0000       1.5
***************
*** 447,450 ****
--- 447,451 ----
  
      geom.bumper_def_count = 1;
+     geom.bumper_def = new player_blobfinder_blob_t;
  
      geom.bumper_def[0].pose.px = -ROBOTINO_RADIUS/2;
***************
*** 459,462 ****
--- 460,465 ----
                    (void*)&geom, sizeof(geom), NULL);
  
+     delete geom.bumper_def;
+     
      return(0);
     }
***************
*** 469,472 ****
--- 472,476 ----
        memset(&geom, 0, sizeof(geom));
        geom.poses_count = com.numDistanceSensors();
+       geom.poses = new player_pose3d_t [geom.poses_count];
        
        for(unsigned int intCount = 0;intCount < geom.poses_count;intCount++)
***************
*** 483,486 ****
--- 487,491 ----
                    sizeof(geom),
                    NULL);
+       delete [] geom.poses;
        return (0);
      }
***************
*** 615,618 ****
--- 620,624 ----
        // Update bumper data
        bumperdata.bumpers_count = 1;
+       bumperdata.bumpers = new uint8_t;
        bumperdata.bumpers[0] = com.bumper();
        
***************
*** 622,629 ****
--- 628,637 ----
                    PLAYER_MSGTYPE_DATA, PLAYER_BUMPER_DATA_STATE,
                    (void*)&bumperdata, sizeof(bumperdata), NULL);
+       delete bumperdata.bumpers;
        
        // Update IR data
        // Number of IR sensors on Robotino(R)
        irdata.ranges_count = com.numDistanceSensors();
+       irdata.ranges = new double [irdata.ranges_count];
        // Collect distance measurements from all IR sensors on Robotino(R)
        for(unsigned int intCount = 0;intCount < irdata.ranges_count;intCount++)
***************
*** 645,648 ****
--- 653,657 ----
                     sizeof (irdata),
                     NULL);
+       delete [] irdata.ranges;
        
        // To maintain connection due to RobotinoCom timeout  


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