Skip to content

Commit

Permalink
Merge pull request #2869 from PeterBowman/throttle_consistency_checker
Browse files Browse the repository at this point in the history
Throttle error message on inconsistent encoder timestamps
  • Loading branch information
randaz81 authored Nov 20, 2023
2 parents 68c86b5 + aad6c24 commit cdd617e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 8 additions & 0 deletions doc/release/yarp_3_8/throttle_consistency_checker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
throttle_consistency_checker {#yarp_3_8}
-----------

### Devices

#### `controlBoard_nws_yarp`

* The error message upon inconsistent encoder timestamps has been throttled.
5 changes: 2 additions & 3 deletions src/devices/controlBoard_nws_yarp/ControlBoard_nws_yarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void ControlBoard_nws_yarp::run()
// check we are not overflowing with input messages
constexpr int reads_for_warning = 20;
if (inputStreamingPort.getPendingReads() >= reads_for_warning) {
yCWarning(CONTROLBOARD) << "Number of streaming input messages to be read is " << inputStreamingPort.getPendingReads() << " and can overflow";
yCIWarning(CONTROLBOARD, id()) << "Number of streaming input messages to be read is" << inputStreamingPort.getPendingReads() << "and can overflow";
}

// handle stateExt first
Expand Down Expand Up @@ -513,8 +513,7 @@ void ControlBoard_nws_yarp::run()
{
if (std::abs(times[0] - tt) > 1.0)
{
yCError(CONTROLBOARD, "Encoder Timestamps are not consistent! Data will not be published.");
yarp::sig::Vector _data(subdevice_joints);
yCIErrorThrottle(CONTROLBOARD, id(), 1.0) << "Encoder timestamps are not consistent! Data will not be published.";
return;
}
}
Expand Down

0 comments on commit cdd617e

Please sign in to comment.