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

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

Index: nd_plugin.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/position/nd/nd_plugin.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** nd_plugin.cc        23 Aug 2007 19:58:47 -0000      1.3
--- nd_plugin.cc        1 Nov 2007 22:16:22 -0000       1.4
***************
*** 268,274 ****
      player_devaddr_t sonar_addr;
      int num_sonars;
!     player_pose3d_t sonar_poses[PLAYER_SONAR_MAX_SAMPLES];
      // indices of known bad sonars
!     int bad_sonars[PLAYER_SONAR_MAX_SAMPLES];
      int bad_sonar_count;
      int sonar_buffer;
--- 268,274 ----
      player_devaddr_t sonar_addr;
      int num_sonars;
!     player_pose3d_t * sonar_poses;
      // indices of known bad sonars
!     int * bad_sonars;
      int bad_sonar_count;
      int sonar_buffer;
***************
*** 349,352 ****
--- 349,353 ----
          cf->GetTupleCount(section, "sonar_bad_transducers")))
      {
+       this->bad_sonars = new int[bad_sonar_count];
        for(int i=0;i<this->bad_sonar_count;i++)
          this->bad_sonars[i] = cf->ReadTupleInt(section, 
***************
*** 370,373 ****
--- 371,375 ----
  ND::~ND() 
  {
+   delete [] bad_sonars;
    return;
  }
***************
*** 570,573 ****
--- 572,576 ----
    cfg = (player_sonar_geom_t*)msg->GetPayload();
    this->num_sonars = cfg->poses_count;
+   this->sonar_poses = new player_pose3d_t[num_sonars];
    for(int i=0;i<this->num_sonars;i++)
    {
***************
*** 600,603 ****
--- 603,607 ----
  {
    this->sonar->Unsubscribe(this->InQueue);
+   delete [] sonar_poses;
    free(this->sonar_obstacles);
    return 0;

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/position/nd/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore  17 Sep 2007 02:18:55 -0000      1.2
--- .cvsignore  1 Nov 2007 22:16:22 -0000       1.3
***************
*** 3,4 ****
--- 3,7 ----
  .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