Update of /cvsroot/playerstage/code/player/client_libs/libplayerc
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19101/client_libs/libplayerc
Modified Files:
dev_laser.c playerc.h
Log Message:
implemented min-left and min-right functionality in libplayerc and libplayerc++
Index: playerc.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/client_libs/libplayerc/playerc.h,v
retrieving revision 1.243
retrieving revision 1.244
diff -C2 -d -r1.243 -r1.244
*** playerc.h 3 Dec 2007 01:31:14 -0000 1.243
--- playerc.h 5 Dec 2007 21:43:50 -0000 1.244
***************
*** 1835,1838 ****
--- 1835,1847 ----
int laser_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.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** dev_laser.c 1 Nov 2007 22:16:16 -0000 1.45
--- dev_laser.c 5 Dec 2007 21:43:50 -0000 1.46
***************
*** 133,136 ****
--- 133,138 ----
device->scan_res = db;
device->max_range = scan_data->max_range;
+ device->min_left = device->max_range;
+ device->min_right = device->max_range;
device->scan_count = scan_data->ranges_count;
***************
*** 148,151 ****
--- 150,158 ----
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