Revision: 6938
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6938&view=rev
Author:   jeremy_asher
Date:     2008-07-30 18:08:13 +0000 (Wed, 30 Jul 2008)

Log Message:
-----------
stage: added a CMake option to build CPack scripts (off by default), fixed some 
warnings

Modified Paths:
--------------
    code/stage/trunk/CMakeLists.txt
    code/stage/trunk/libstage/canvas.cc
    code/stage/trunk/libstage/world.cc
    code/stage/trunk/libstageplugin/p_laser.cc

Modified: code/stage/trunk/CMakeLists.txt
===================================================================
--- code/stage/trunk/CMakeLists.txt     2008-07-30 00:25:51 UTC (rev 6937)
+++ code/stage/trunk/CMakeLists.txt     2008-07-30 18:08:13 UTC (rev 6938)
@@ -12,6 +12,7 @@
 
 OPTION (BUILD_PLAYER_PLUGIN "Build Player plugin" ON)
 OPTION (BUILD_LSPTEST "Build Player plugin tests" OFF)
+OPTION (CPACK_CFG "[release building] generate CPack configuration files" OFF)
 
 cmake_minimum_required( VERSION 2.4 FATAL_ERROR )
 
@@ -130,14 +131,16 @@
 
 
 # generate a cpack config file used to create packaged tarballs
-INCLUDE(InstallRequiredSystemLibraries)
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME}: A Multiple Robot 
Simulator")
-SET(CPACK_PACKAGE_VENDOR "The Player Project")
-#SET(CPACK_PACKAGE_DESCRIPTION_FILE 
"${CMAKE_CURRENT_SOURCE_DIR}/DESCRIPTION.txt")
-#SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
-#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt")
-SET(CPACK_PACKAGE_VERSION_MAJOR "${V_MAJOR}")
-SET(CPACK_PACKAGE_VERSION_MINOR "${V_MINOR}")
-SET(CPACK_PACKAGE_VERSION_PATCH "${V_BUGFIX}")
-SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${V_MAJOR}.${V_MINOR}")
-INCLUDE(CPack)
+IF ( CPACK_CFG )
+  INCLUDE(InstallRequiredSystemLibraries)
+  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME}: A Multiple Robot 
Simulator")
+  SET(CPACK_PACKAGE_VENDOR "The Player Project")
+  #SET(CPACK_PACKAGE_DESCRIPTION_FILE 
"${CMAKE_CURRENT_SOURCE_DIR}/DESCRIPTION.txt")
+  #SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
+  #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt")
+  SET(CPACK_PACKAGE_VERSION_MAJOR "${V_MAJOR}")
+  SET(CPACK_PACKAGE_VERSION_MINOR "${V_MINOR}")
+  SET(CPACK_PACKAGE_VERSION_PATCH "${V_BUGFIX}")
+  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${V_MAJOR}.${V_MINOR}")
+  INCLUDE(CPack)
+ENDIF ( CPACK_CFG )

Modified: code/stage/trunk/libstage/canvas.cc
===================================================================
--- code/stage/trunk/libstage/canvas.cc 2008-07-30 00:25:51 UTC (rev 6937)
+++ code/stage/trunk/libstage/canvas.cc 2008-07-30 18:08:13 UTC (rev 6938)
@@ -741,8 +741,8 @@
                        clockstr.append( " [ FOLLOW MODE ]" );
 
                int margin = 3;
-               int width = gl_width( clockstr.c_str() ) + 2 * margin;
-               int height = gl_height() + 2 * margin;
+               float width = gl_width( clockstr.c_str() ) + 2 * margin;
+               float height = gl_height() + 2 * margin;
                
                colorstack.Push( 0.8,0.8,1.0 ); // pale blue
                glRectf( 0, 0, width, height );

Modified: code/stage/trunk/libstage/world.cc
===================================================================
--- code/stage/trunk/libstage/world.cc  2008-07-30 00:25:51 UTC (rev 6937)
+++ code/stage/trunk/libstage/world.cc  2008-07-30 18:08:13 UTC (rev 6938)
@@ -227,8 +227,8 @@
                       (int)(this->interval_sim/thousand) );
 
        if( wf->PropertyExists( entity, "quit_time" ) ) {
-               this->quit_time = (stg_usec_t)million * 
-                       wf->ReadFloat( entity, "quit_time", 0 );
+               this->quit_time = (stg_usec_t) ( million * 
+                       wf->ReadFloat( entity, "quit_time", 0 ) );
        }
 
        if( wf->PropertyExists( entity, "resolution" ) )

Modified: code/stage/trunk/libstageplugin/p_laser.cc
===================================================================
--- code/stage/trunk/libstageplugin/p_laser.cc  2008-07-30 00:25:51 UTC (rev 
6937)
+++ code/stage/trunk/libstageplugin/p_laser.cc  2008-07-30 18:08:13 UTC (rev 
6938)
@@ -114,10 +114,10 @@
                          cfg.resolution, cfg.fov, cfg.interval );
      
          cfg.fov = plc->max_angle - plc->min_angle;
-         cfg.resolution = cfg.fov / ( cfg.sample_count * plc->resolution );
+         cfg.resolution = (uint32_t) ( cfg.fov / ( cfg.sample_count * 
plc->resolution ) );
          if ( cfg.resolution < 1 ) 
                  cfg.resolution = 1;
-         cfg.interval = 1.0E6 / plc->scanning_frequency;
+         cfg.interval = (stg_usec_t) ( 1.0E6 / plc->scanning_frequency );
                
          PRINT_DEBUG3( "setting laser config: resolution %d, fov %.6f, 
interval %d\n", 
                          cfg.resolution, cfg.fov, cfg.interval );


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to