Revision: 7800
http://playerstage.svn.sourceforge.net/playerstage/?rev=7800&view=rev
Author: thjc
Date: 2009-06-06 09:31:46 +0000 (Sat, 06 Jun 2009)
Log Message:
-----------
applied patch 2794485
playerv IR display
Modified Paths:
--------------
code/player/trunk/utils/playerv/pv_dev_ir.c
Modified: code/player/trunk/utils/playerv/pv_dev_ir.c
===================================================================
--- code/player/trunk/utils/playerv/pv_dev_ir.c 2009-06-06 09:26:50 UTC (rev
7799)
+++ code/player/trunk/utils/playerv/pv_dev_ir.c 2009-06-06 09:31:46 UTC (rev
7800)
@@ -1,4 +1,4 @@
-/*
+/*
* PlayerViewer
* Copyright (C) Andrew Howard 2002
*
@@ -45,11 +45,10 @@
ir_t *ir_create(mainwnd_t *mainwnd, opt_t *opt, playerc_client_t *client,
int index, const char *drivername, int subscribe)
{
- int i;
char label[64];
char section[64];
ir_t *ir;
-
+
ir = malloc(sizeof(ir_t));
ir->proxy = playerc_ir_create(client, index);
ir->drivername = strdup(drivername);
@@ -68,7 +67,7 @@
rtk_menuitem_check(ir->subscribe_item, subscribe);
ir->fig_count = 0;
-
+ ir->scan_fig = NULL;
return ir;
}
@@ -79,7 +78,7 @@
if (fig_count <= ir->fig_count)
return;
ir->scan_fig = realloc(ir->scan_fig,fig_count*sizeof(ir->scan_fig[0]));
-
+
// Construct figures
for (i = ir->fig_count; i < fig_count; i++)
ir->scan_fig[i] = rtk_fig_create(ir->mainwnd->canvas,
ir->mainwnd->robot_fig, 1);
@@ -91,7 +90,7 @@
void ir_destroy(ir_t *ir)
{
int i;
-
+
if (ir->proxy->info.subscribed)
playerc_ir_unsubscribe(ir->proxy);
playerc_ir_destroy(ir->proxy);
@@ -112,7 +111,7 @@
void ir_update(ir_t *ir)
{
int i;
-
+
// Update the device subscription
if (rtk_menuitem_ischecked(ir->subscribe_item))
{
@@ -123,7 +122,7 @@
// Get the ir geometry
if (playerc_ir_get_geom(ir->proxy) != 0)
- PRINT_ERR1("get_geom failed : %s", playerc_error_str());
+ PRINT_ERR1("get_geom failed : %s", playerc_error_str());
ir_allocate_figures(ir, ir->proxy->poses.poses_count);
for (i = 0; i < ir->proxy->poses.poses_count; i++)
@@ -167,7 +166,7 @@
for (i = 0; i < ir->proxy->data.ranges_count; i++)
{
- rtk_fig_show(ir->scan_fig[i], 1);
+ rtk_fig_show(ir->scan_fig[i], 1);
rtk_fig_clear(ir->scan_fig[i]);
// Draw in the ir itself
@@ -178,7 +177,7 @@
rtk_fig_color_rgb32(ir->scan_fig[i], COLOR_IR_SCAN);
dr = ((double)ir->proxy->data.ranges[i]);
da = 20 * M_PI / 180 / 2;
-
+
points[0][0] = 0;
points[0][1] = 0;
points[1][0] = dr * cos(-da);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit