diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp index 2f793e0cafedb5cc17bb4c5eca6c4fa4ecb85c17..c8801318f518ad05c4e0bd4ec2db3c72341a7f15 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp @@ -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) {