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

Modified Files:
        .cvsignore create_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/create/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore  17 Sep 2007 02:18:56 -0000      1.2
--- .cvsignore  1 Nov 2007 22:16:20 -0000       1.3
***************
*** 3,4 ****
--- 3,6 ----
  .deps
  *.la
+ .libs
+ *.lo

Index: create_driver.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/irobot/create/create_driver.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** create_driver.cc    10 Oct 2007 02:32:10 -0000      1.7
--- create_driver.cc    1 Nov 2007 22:16:20 -0000       1.8
***************
*** 339,342 ****
--- 339,343 ----
  
       bumperdata.bumpers_count = 2;
+      bumperdata.bumpers = new uint8_t[bumperdata.bumpers_count];
       bumperdata.bumpers[0] = this->create_dev->bumper_left;
       bumperdata.bumpers[1] = this->create_dev->bumper_right;
***************
*** 344,348 ****
       this->Publish(this->bumper_addr,
                     PLAYER_MSGTYPE_DATA, PLAYER_BUMPER_DATA_STATE,
!                    (void*)&bumperdata, sizeof(bumperdata), NULL);
  
       ////////////////////////////
--- 345,350 ----
       this->Publish(this->bumper_addr,
                     PLAYER_MSGTYPE_DATA, PLAYER_BUMPER_DATA_STATE,
!                    (void*)&bumperdata);
!      delete [] bumperdata.bumpers;
  
       ////////////////////////////
***************
*** 352,355 ****
--- 354,358 ----
  
       irdata.ranges_count = 11;
+      irdata.ranges = new float [irdata.ranges_count];
       irdata.ranges[0] = (float)this->create_dev->wall;
       irdata.ranges[1] = (float)this->create_dev->cliff_left;
***************
*** 366,370 ****
       this->Publish(this->ir_addr,
           PLAYER_MSGTYPE_DATA, PLAYER_IR_DATA_RANGES,
!          (void*)&irdata, sizeof(irdata), NULL);
  
  
--- 369,374 ----
       this->Publish(this->ir_addr,
           PLAYER_MSGTYPE_DATA, PLAYER_IR_DATA_RANGES,
!          (void*)&irdata);
!      delete [] irdata.ranges;
  
  
***************
*** 388,391 ****
--- 392,396 ----
  
       this->cpdata->data_count=5;
+      this->cpdata->data = new uint8_t [this->cpdata->data_count];
  
       this->cpdata->data[0] = this->create_dev->button_max;
***************
*** 398,401 ****
--- 403,407 ----
           PLAYER_MSGTYPE_DATA,PLAYER_OPAQUE_DATA_STATE,
           (void*)this->cpdata, sizeof(*this->cpdata), NULL);
+      delete [] this->cpdata->data;
  
       usleep(CYCLE_TIME_US);
***************
*** 459,462 ****
--- 465,469 ----
  
      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;
***************
*** 475,479 ****
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_BUMPER_REQ_GET_GEOM,
!                   (void*)&geom, sizeof(geom), NULL);
  
      return(0);
--- 482,487 ----
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_BUMPER_REQ_GET_GEOM,
!                   (void*)&geom);
!     delete [] geom.bumper_def;
  
      return(0);
***************
*** 486,489 ****
--- 494,498 ----
  
      poses.poses_count = 11;
+     poses.poses = new player_pose3d_t[poses.poses_count];
  
      // TODO: Fill in proper values
***************
*** 498,502 ****
                    PLAYER_MSGTYPE_RESP_ACK,
                    PLAYER_IR_REQ_POSE,
!                   (void*)&poses, sizeof(poses), NULL);
      return(0);
    }
--- 507,512 ----
                    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