Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throttle error message on inconsistent encoder timestamps #2869

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading