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

Change to show error if the current value remains static over a period of time

Previously the error only appears if the current value remains zero over a period of time.
parent 3eb20df3
No related branches found
No related tags found
No related merge requests found
......@@ -1277,7 +1277,7 @@ void KinematicUnitWidgetController::highlightCriticalValues()
// check robot current value of nodes
for (unsigned int i = 0; i < rn.size(); i++)
{
bool isZero = true;
bool isStatic = true;
float smoothedValue = 0;
for (auto historyIt = jointCurrentHistory.begin(); historyIt != jointCurrentHistory.end(); historyIt++)
......@@ -1294,9 +1294,9 @@ void KinematicUnitWidgetController::highlightCriticalValues()
smoothedValue = 0.5f * currentValue + 0.5f * smoothedValue;
if (currentValue != 0)
if (currentValue != jointCurrentHistory.begin()->second.find(rn[i]->getName())->second)
{
isZero = false;
isStatic = false;
}
}
......@@ -1304,7 +1304,7 @@ void KinematicUnitWidgetController::highlightCriticalValues()
it = reportedJointStatuses.find(rn[i]->getName());
JointStatus currentStatus = it->second;
if (isZero)
if (isStatic)
{
if (currentStatus.operation != eOffline)
{
......
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