Skip to content
Snippets Groups Projects
Commit 5c797a87 authored by armar4-demo's avatar armar4-demo
Browse files

switched highlighting of current==0 situation (now checking jointStatus.operation!=eOffline)

parent 9b1e1a00
No related branches found
No related tags found
No related merge requests found
......@@ -1182,6 +1182,7 @@ void KinematicUnitWidgetController::reportControlModeChanged(const NameControlMo
void KinematicUnitWidgetController::reportJointCurrents(const NameValueMap& jointCurrents, Ice::Long timestamp, bool aValueChanged, const Ice::Current& c)
{
boost::recursive_mutex::scoped_lock lock(mutexNodeSet);
if (aValueChanged && jointCurrents.size() > 0)
{
jointCurrentHistory.push_back(std::pair<Ice::Long, NameValueMap>(timestamp, jointCurrents));
......@@ -1192,6 +1193,7 @@ void KinematicUnitWidgetController::reportJointCurrents(const NameValueMap& join
jointCurrentHistory.pop_front();
}
if (jointCurrentHistory.size() > 0)
{
emit jointCurrentsReported();
......@@ -1288,7 +1290,7 @@ void KinematicUnitWidgetController::highlightCriticalValues()
const float currentValue = std::fabs(it->second);
smoothedValue = 0.5f*currentValue + 0.5f*smoothedValue;
smoothedValue = 0.5f * currentValue + 0.5f * smoothedValue;
if (currentValue != 0)
{
......@@ -1300,10 +1302,14 @@ void KinematicUnitWidgetController::highlightCriticalValues()
it = reportedJointStatuses.find(rn[i]->getName());
JointStatus currentStatus = it->second;
if (isZero && currentStatus.enabled)
if (isZero)
{
// current value is zero, but joint is enabled
ui.tableJointList->item(i, eTabelColumnCurrent)->setBackground(Qt::darkYellow);
if (currentStatus.operation != eOffline)
{
// current value is zero, but joint is not offline
ui.tableJointList->item(i, eTabelColumnCurrent)->setBackground(Qt::yellow);
}
}
else if (smoothedValue > currentValueMax)
{
......
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