Revision: 7461
http://playerstage.svn.sourceforge.net/playerstage/?rev=7461&view=rev
Author: natepak
Date: 2009-03-11 16:19:22 +0000 (Wed, 11 Mar 2009)
Log Message:
-----------
added threads
Modified Paths:
--------------
code/branches/federation/gazebo/build.py
code/branches/federation/gazebo/server/Simulator.cc
Modified: code/branches/federation/gazebo/build.py
===================================================================
--- code/branches/federation/gazebo/build.py 2009-03-11 16:14:35 UTC (rev
7460)
+++ code/branches/federation/gazebo/build.py 2009-03-11 16:19:22 UTC (rev
7461)
@@ -170,7 +170,7 @@
# If valid so far, apply any flags to the environment
if valid:
for flag in flags:
- env.Append(CCFLAGS = " " + flag)
+ env.Append(CCFLAGS = flag)
# Check for trimesh support in ODE
#if not conf.CheckODELib():
Modified: code/branches/federation/gazebo/server/Simulator.cc
===================================================================
--- code/branches/federation/gazebo/server/Simulator.cc 2009-03-11 16:14:35 UTC
(rev 7460)
+++ code/branches/federation/gazebo/server/Simulator.cc 2009-03-11 16:19:22 UTC
(rev 7461)
@@ -295,11 +295,11 @@
this->prevPhysicsTime = this->GetRealTime();
this->prevRenderTime = this->GetRealTime();
- //this->guiThread = new boost::thread( boost::bind(&Simulator::GuiLoop,
this));
+ this->guiThread = new boost::thread( boost::bind(&Simulator::GuiLoop, this));
while (!this->userQuit)
{
- currTime = this->GetRealTime();
+ /*currTime = this->GetRealTime();
if (physicsUpdateRate == 0 ||
currTime - this->prevPhysicsTime >= physicsUpdatePeriod)
@@ -332,6 +332,7 @@
//this->GetRenderEngine()->Render();
//this->prevRenderTime = this->GetRealTime();
}
+ */
// Update the gui
if (this->gui)
@@ -339,21 +340,22 @@
this->gui->Update();
}
- world->ProcessMessages();
+ /*world->ProcessMessages();
elapsedTime = (this->GetRealTime() - currTime);
+ */
// Wait if we're going too fast
- /*if ( elapsedTime < 1.0/MAX_FRAME_RATE )
- {
- usleep( (int)((1.0/MAX_FRAME_RATE - elapsedTime) * 1e6) );
- }*/
+ //if ( elapsedTime < 1.0/MAX_FRAME_RATE )
+ //{
+ // usleep( (int)((1.0/MAX_FRAME_RATE - elapsedTime) * 1e6) );
+ //}
if (this->timeout > 0 && this->GetRealTime() > this->timeout)
break;
}
- //this->guiThread->join();
+ this->guiThread->join();
}
////////////////////////////////////////////////////////////////////////////////
@@ -609,7 +611,7 @@
world->ProcessMessages();
- usleep(1000);
+ usleep(10);
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit