diff --git a/libraries/YarpPlugins/Jr3Mbed/Jr3Mbed.cpp b/libraries/YarpPlugins/Jr3Mbed/Jr3Mbed.cpp index 0a6556c79..3daad308e 100644 --- a/libraries/YarpPlugins/Jr3Mbed/Jr3Mbed.cpp +++ b/libraries/YarpPlugins/Jr3Mbed/Jr3Mbed.cpp @@ -5,6 +5,8 @@ #include #include // std::memcpy +#include + #include #include "LogComponent.hpp" @@ -15,17 +17,29 @@ using namespace roboticslab; bool Jr3Mbed::performRequest(const std::string & cmd, const can_message & msg, std::uint8_t * response, bool quiet) { +#if YARP_VERSION_COMPARE(>=, 3, 9, 0) + yCIInfo(quiet ? JR3M_QUIET : JR3M, id()) << "Sending" << cmd << "command"; +#else yCIInfo((quiet ? JR3M_QUIET : JR3M), id()) << "Sending" << cmd << "command"; +#endif if (!sender || !sender->prepareMessage(msg)) { +#if YARP_VERSION_COMPARE(>=, 3, 9, 0) + yCIWarning(quiet ? JR3M_QUIET : JR3M, id()) << "Unable to register" << cmd << "command"; +#else yCIWarning((quiet ? JR3M_QUIET : JR3M), id()) << "Unable to register" << cmd << "command"; +#endif return false; } if (!ackStateObserver->await(response)) { +#if YARP_VERSION_COMPARE(>=, 3, 9, 0) + yCIWarning(quiet ? JR3M_QUIET : JR3M, id()) << "Command" << cmd << "timed out"; +#else yCIWarning((quiet ? JR3M_QUIET : JR3M), id()) << "Command" << cmd << "timed out"; +#endif return false; }