Skip to content
Snippets Groups Projects
Commit 60a311fd authored by Mirko Wächter's avatar Mirko Wächter
Browse files

mutex fix in kinematic unit gui

parent bc942044
No related branches found
No related tags found
No related merge requests found
......@@ -940,14 +940,15 @@ QString KinematicUnitWidgetController::translateStatus(ErrorStatus status)
void KinematicUnitWidgetController::updateJointAnglesTable()
{
if (!robotNodeSet)
{
return;
}
float dirty_squaresum = 0;
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (!robotNodeSet)
{
return;
}
std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes();
......@@ -983,13 +984,17 @@ void KinematicUnitWidgetController::updateJointAnglesTable()
void KinematicUnitWidgetController::updateJointVelocitiesTable()
{
if (!getWidget() || !robotNodeSet)
if (!getWidget())
{
return;
}
float dirty_squaresum = 0;
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (!robotNodeSet)
{
return;
}
std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes();
QTableWidgetItem* newItem;
......@@ -1019,12 +1024,13 @@ void KinematicUnitWidgetController::updateJointVelocitiesTable()
void KinematicUnitWidgetController::updateJointTorquesTable()
{
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (!getWidget() || !robotNodeSet)
{
return;
}
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes();
QTableWidgetItem* newItem;
NameValueMap::const_iterator it;
......@@ -1046,12 +1052,13 @@ void KinematicUnitWidgetController::updateJointTorquesTable()
void KinematicUnitWidgetController::updateJointCurrentsTable()
{
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (!getWidget() || !robotNodeSet)
{
return;
}
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes();
QTableWidgetItem* newItem;
NameValueMap::const_iterator it;
......@@ -1073,12 +1080,13 @@ void KinematicUnitWidgetController::updateJointCurrentsTable()
void KinematicUnitWidgetController::updateJointMotorTemperaturesTable()
{
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (!getWidget() || !robotNodeSet)
{
return;
}
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
std::vector< RobotNodePtr > rn = robotNodeSet->getAllRobotNodes();
QTableWidgetItem* newItem;
NameValueMap::const_iterator it;
......@@ -1198,13 +1206,14 @@ void KinematicUnitWidgetController::reportJointStatuses(const NameStatusMap& joi
void KinematicUnitWidgetController::updateModel()
{
// ARMARX_INFO << "updateModel()" << flush;
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (!robotNodeSet)
{
return;
}
// ARMARX_INFO << "updateModel()" << flush;
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
std::vector< RobotNodePtr > rn2 = robotNodeSet->getAllRobotNodes();
std::vector< RobotNodePtr > usedNodes;
......
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