Skip to content
Snippets Groups Projects
Commit 79de63a3 authored by Leonard's avatar Leonard
Browse files

Merge branch 'master' of https://gitlab.com/ArmarX/RobotAPI

parents 5f8e1ffc d0d9082a
No related branches found
No related tags found
No related merge requests found
......@@ -267,9 +267,15 @@ void KinematicUnitObserver::reportJointStatuses(const NameStatusMap& jointStatus
void KinematicUnitObserver::nameValueMapToDataFields(const std::string& channelName, const NameValueMap& nameValueMap, Ice::Long timestamp, bool aValueChanged)
{
// ARMARX_INFO << deactivateSpam(10) << " timestamp is " << (IceUtil::Time::now() - IceUtil::Time::microSeconds(timestamp)).toMicroSecondsDouble() << " µs old";
if (aValueChanged || initializedChannels.count(channelName) == 0)
bool newChannel;
{
ScopedLock lock(initializedChannelsMutex);
newChannel = initializedChannels.count(channelName) == 0;
initializedChannels.insert(channelName);
}
if (aValueChanged || newChannel)
{
boost::unordered_map< ::std::string, ::armarx::VariantBasePtr> map;
if (timestamp < 0)
{
......
......@@ -140,6 +140,7 @@ namespace armarx
protected:
void nameValueMapToDataFields(const std::string& channelName, const NameValueMap& nameValueMap, Ice::Long timestamp, bool aValueChanged);
std::set<std::string> initializedChannels;
Mutex initializedChannelsMutex;
private:
std::string robotNodeSetName;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment