Revision: 7804
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7804&view=rev
Author:   thjc
Date:     2009-06-06 10:44:38 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
applied playerv ir fix from trunk

Modified Paths:
--------------
    code/player/branches/release-2-1-patches/utils/playerv/pv_dev_ir.c

Property Changed:
----------------
    code/player/branches/release-2-1-patches/


Property changes on: code/player/branches/release-2-1-patches
___________________________________________________________________
Modified: svn:mergeinfo
   - /code/player/trunk:7062,7081,7166-7169,7188,7207,7246,7297-7298
   + /code/player/trunk:7062,7081,7166-7169,7188,7207,7246,7297-7298,7800

Modified: code/player/branches/release-2-1-patches/utils/playerv/pv_dev_ir.c
===================================================================
--- code/player/branches/release-2-1-patches/utils/playerv/pv_dev_ir.c  
2009-06-06 10:23:35 UTC (rev 7803)
+++ code/player/branches/release-2-1-patches/utils/playerv/pv_dev_ir.c  
2009-06-06 10:44:38 UTC (rev 7804)
@@ -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

Reply via email to