diff --git a/doc/release/yarp_3_8/throttle_consistency_checker.md b/doc/release/yarp_3_8/throttle_consistency_checker.md new file mode 100644 index 0000000000..5bbdf1e08a --- /dev/null +++ b/doc/release/yarp_3_8/throttle_consistency_checker.md @@ -0,0 +1,8 @@ +throttle_consistency_checker {#yarp_3_8} +----------- + +### Devices + +#### `controlBoard_nws_yarp` + +* The error message upon inconsistent encoder timestamps has been throttled. diff --git a/src/devices/controlBoard_nws_yarp/ControlBoard_nws_yarp.cpp b/src/devices/controlBoard_nws_yarp/ControlBoard_nws_yarp.cpp index 2cbd41db98..f7cd2fceba 100644 --- a/src/devices/controlBoard_nws_yarp/ControlBoard_nws_yarp.cpp +++ b/src/devices/controlBoard_nws_yarp/ControlBoard_nws_yarp.cpp @@ -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 @@ -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; } }