Revision: 8604 http://playerstage.svn.sourceforge.net/playerstage/?rev=8604&view=rev Author: natepak Date: 2010-03-31 22:43:07 +0000 (Wed, 31 Mar 2010)
Log Message: ----------- Added an always on flag to sensors Modified Paths: -------------- code/gazebo/trunk/server/sensors/Sensor.cc code/gazebo/trunk/server/sensors/Sensor.hh code/gazebo/trunk/server/sensors/ray/RaySensor.cc Modified: code/gazebo/trunk/server/sensors/Sensor.cc =================================================================== --- code/gazebo/trunk/server/sensors/Sensor.cc 2010-03-31 07:27:13 UTC (rev 8603) +++ code/gazebo/trunk/server/sensors/Sensor.cc 2010-03-31 22:43:07 UTC (rev 8604) @@ -53,6 +53,7 @@ Param::Begin(&this->parameters); this->updateRateP = new ParamT<double>("updateRate", 0, 0); + this->alwaysActiveP = new ParamT<bool>("alwaysActive", false, 0); Param::End(); } @@ -61,6 +62,7 @@ Sensor::~Sensor() { delete this->updateRateP; + delete this->alwaysActiveP; } //////////////////////////////////////////////////////////////////////////////// @@ -69,6 +71,7 @@ { this->nameP->Load(node); this->updateRateP->Load(node); + this->alwaysActiveP->Load(node); if (**(this->updateRateP) == 0) this->updatePeriod = 0.0; Modified: code/gazebo/trunk/server/sensors/Sensor.hh =================================================================== --- code/gazebo/trunk/server/sensors/Sensor.hh 2010-03-31 07:27:13 UTC (rev 8603) +++ code/gazebo/trunk/server/sensors/Sensor.hh 2010-03-31 22:43:07 UTC (rev 8604) @@ -112,6 +112,7 @@ protected: bool active; protected: ParamT<double> *updateRateP; + protected: ParamT<bool> *alwaysActiveP; protected: Time updatePeriod; protected: Time lastUpdate; protected: std::string typeName; Modified: code/gazebo/trunk/server/sensors/ray/RaySensor.cc =================================================================== --- code/gazebo/trunk/server/sensors/ray/RaySensor.cc 2010-03-31 07:27:13 UTC (rev 8603) +++ code/gazebo/trunk/server/sensors/ray/RaySensor.cc 2010-03-31 22:43:07 UTC (rev 8604) @@ -196,6 +196,6 @@ // Update the sensor information void RaySensor::UpdateChild() { - if (this->active) + if (this->active || (**this->alwaysActiveP)) this->laserShape->Update(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit