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

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

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/irobot/roomba/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore  17 Sep 2007 02:18:57 -0000      1.2
--- .cvsignore  1 Nov 2007 22:16:20 -0000       1.3
***************
*** 3,4 ****
--- 3,6 ----
  .deps
  *.la
+ .libs
+ *.lo

Index: roomba_driver.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/irobot/roomba/roomba_driver.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** roomba_driver.cc    23 Aug 2007 19:58:45 -0000      1.16
--- roomba_driver.cc    1 Nov 2007 22:16:20 -0000       1.17
***************
*** 330,333 ****
--- 330,334 ----
  
       bumperdata.bumpers_count = 2;
+      bumperdata.bumpers = new uint8_t[bumperdata.bumpers_count];
       bumperdata.bumpers[0] = this->roomba_dev->bumper_left;
       bumperdata.bumpers[1] = this->roomba_dev->bumper_right;
***************
*** 335,339 ****
       this->Publish(this->bumper_addr, 
                     PLAYER_MSGTYPE_DATA, PLAYER_BUMPER_DATA_STATE,
!                    (void*)&bumperdata, sizeof(bumperdata), NULL);
  
       ////////////////////////////
--- 336,341 ----
       this->Publish(this->bumper_addr, 
                     PLAYER_MSGTYPE_DATA, PLAYER_BUMPER_DATA_STATE,
!                    (void*)&bumperdata);
!      delete [] bumperdata.bumpers;
  
       ////////////////////////////
***************
*** 343,346 ****
--- 345,349 ----
  
       irdata.ranges_count = 11;
+      irdata.ranges = new float [irdata.ranges_count];
       irdata.ranges[0] = (float)this->roomba_dev->wall;
       irdata.ranges[1] = (float)this->roomba_dev->cliff_left;
***************
*** 357,361 ****
       this->Publish(this->ir_addr,
           PLAYER_MSGTYPE_DATA, PLAYER_IR_DATA_RANGES,
!          (void*)&irdata, sizeof(irdata), NULL);
  
  
--- 360,365 ----
       this->Publish(this->ir_addr,
           PLAYER_MSGTYPE_DATA, PLAYER_IR_DATA_RANGES,
!          (void*)&irdata);
!      delete [] irdata.ranges;
  
  
***************
*** 380,383 ****
--- 384,388 ----
  
       cpdata.data_count=5;
+      cpdata.data = new uint8_t [cpdata.data_count];
  
       cpdata.data[0]=this->roomba_dev->button_max;
***************
*** 389,393 ****
       this->Publish(this->opaque_addr,
           PLAYER_MSGTYPE_DATA,PLAYER_OPAQUE_DATA_STATE,
!          (void*)&cpdata, sizeof(cpdata), NULL);
  
       usleep(CYCLE_TIME_US);
--- 394,399 ----
       this->Publish(this->opaque_addr,
           PLAYER_MSGTYPE_DATA,PLAYER_OPAQUE_DATA_STATE,
!          (void*)&cpdata);
!      delete [] cpdata.data;
  
       usleep(CYCLE_TIME_US);
***************
*** 451,454 ****
--- 457,461 ----
  
      geom.bumper_def_count = 2;
+     geom.bumper_def = new player_bumper_define_t[geom.bumper_def_count];
  
      geom.bumper_def[0].pose.px = 0.0;
***************
*** 467,471 ****
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_BUMPER_REQ_GET_GEOM,
!                   (void*)&geom, sizeof(geom), NULL);
  
      return(0);
--- 474,479 ----
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_BUMPER_REQ_GET_GEOM,
!                   (void*)&geom);
!     delete [] geom.bumper_def;
  
      return(0);
***************
*** 478,481 ****
--- 486,490 ----
  
      poses.poses_count = 11;
+     poses.poses = new player_pose3d_t[poses.poses_count];
  
      // TODO: Fill in proper values
***************
*** 490,494 ****
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_IR_REQ_POSE,
!                   (void*)&poses, sizeof(poses), NULL);
      return(0);
    }
--- 499,504 ----
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_IR_REQ_POSE,
!                   (void*)&poses);
!     delete [] poses.poses;
      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

Reply via email to