Revision: 7155 http://playerstage.svn.sourceforge.net/playerstage/?rev=7155&view=rev Author: natepak Date: 2008-11-17 21:08:21 +0000 (Mon, 17 Nov 2008)
Log Message: ----------- Added patch #2122802 Modified Paths: -------------- code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc Modified: code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc =================================================================== --- code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc 2008-11-17 02:00:11 UTC (rev 7154) +++ code/gazebo/trunk/server/sensors/camera/MonoCameraSensor.cc 2008-11-17 21:08:21 UTC (rev 7155) @@ -37,6 +37,7 @@ #include "OgreVisual.hh" #include "OgreCreator.hh" #include "OgreFrameListener.hh" +#include "Simulator.hh" #include "SensorFactory.hh" #include "CameraManager.hh" @@ -240,8 +241,12 @@ char tmp[1024]; if (!this->savePathnameP->GetValue().empty()) { - sprintf(tmp, "%s/%s-%04d.jpg", this->savePathnameP->GetValue().c_str(), - this->GetName().c_str(), this->saveCount); + double simTime = Simulator::Instance()->GetSimTime(); + int min = (int)(simTime / 60.0); + int sec = (int)(simTime - min*60); + int msec = (int)(simTime*1000 - min*60000 - sec*1000); + + sprintf(tmp, "%s/%s-%04d-%03dm_%02ds_%03dms.jpg", this->savePathnameP->GetValue().c_str(), this->GetName().c_str(), this->saveCount, min, sec, msec); } else { 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