Skip to content
Snippets Groups Projects
Commit 6fa6dfa4 authored by Adrian Knobloch's avatar Adrian Knobloch
Browse files

Revert "Fix clearing outdated values in history"

This reverts commit 5c96056d.

Changes done in wrong method.
parent 5c96056d
No related branches found
No related tags found
1 merge request!17Kinematic unit GUI
......@@ -1190,18 +1190,15 @@ void KinematicUnitWidgetController::reportJointMotorTemperatures(const NameValue
void KinematicUnitWidgetController::reportJointStatuses(const NameStatusMap& jointStatuses, Ice::Long timestamp, bool aValueChanged, const Ice::Current&)
{
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (aValueChanged && jointCurrents.size() > 0)
if (!aValueChanged && reportedJointStatuses.size() > 0)
{
jointCurrentHistory.push_back(std::pair<Ice::Long, NameValueMap>(timestamp, jointCurrents));
return;
}
while (jointCurrentHistory.back().first - jointCurrentHistory.front().first > historyTime && jointCurrentHistory.size() > 1)
{
jointCurrentHistory.pop_front();
}
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
reportedJointStatuses = jointStatuses;
emit jointCurrentsReported();
emit jointStatusesReported();
}
......
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