Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24320/client_libs/libplayerc

Modified Files:
      Tag: release-2-0-patches
        dev_laser.c playerc.h 
Log Message:
merged client-side laser min-left / min-right fixes from HEAD

Index: playerc.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.185.2.8
retrieving revision 1.185.2.9
diff -C2 -d -r1.185.2.8 -r1.185.2.9
*** playerc.h   18 Oct 2007 22:21:12 -0000      1.185.2.8
--- playerc.h   5 Dec 2007 21:57:34 -0000       1.185.2.9
***************
*** 1545,1548 ****
--- 1545,1557 ----
    int scan_id;
  
+   /** Minimum range, in meters, in the right half of the scan (those ranges
+    * from the first beam, counterclockwise, up to the middle of the scan,
+    * including the middle beam, if one exists). */
+   double min_right;
+ 
+   /** Minimum range, in meters, in the left half of the scan (those ranges
+    * from the first beam after the middle of the scan, counterclockwise, to
+    * the last beam). */
+   double min_left;
  } playerc_laser_t;
  

Index: dev_laser.c
===================================================================
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/dev_laser.c,v
retrieving revision 1.38
retrieving revision 1.38.4.1
diff -C2 -d -r1.38 -r1.38.4.1
*** dev_laser.c 11 Oct 2005 22:36:11 -0000      1.38
--- dev_laser.c 5 Dec 2007 21:57:34 -0000       1.38.4.1
***************
*** 125,128 ****
--- 125,130 ----
      device->scan_res = db;
      device->max_range = scan_data->max_range;
+     device->min_left = device->max_range;
+     device->min_right = device->max_range;
  
      for (i = 0; i < scan_data->ranges_count; i++)
***************
*** 137,140 ****
--- 139,147 ----
        device->intensity[i] = scan_data->intensity[i];
        b += db;
+ 
+       if((i <= scan_data->ranges_count/2) && (r < device->min_right))
+         device->min_right = r;
+       else if((i > scan_data->ranges_count/2) && (r < device->min_left))
+         device->min_left = r;
      }
  


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to