From 037eb8e26623f2ab95c71fa4eb260948f7b6767f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 2 Aug 2024 10:51:31 +0200 Subject: [PATCH] robotinterface: Do not print a message if a device does not derive from IWrapper --- src/libYARP_robotinterface/src/yarp/robotinterface/Device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libYARP_robotinterface/src/yarp/robotinterface/Device.cpp b/src/libYARP_robotinterface/src/yarp/robotinterface/Device.cpp index 5cb2a3463b9..17a499ee553 100644 --- a/src/libYARP_robotinterface/src/yarp/robotinterface/Device.cpp +++ b/src/libYARP_robotinterface/src/yarp/robotinterface/Device.cpp @@ -426,7 +426,7 @@ bool yarp::robotinterface::Device::attach(const yarp::dev::PolyDriverList& drive if (drivers.size() == 1) { yarp::dev::IWrapper* wrapper; if (!driver()->view(wrapper)) { - yInfo() << name() << "is not an IWrapper. Trying IMultipleWrapper"; + // If the device is not a IWrapper, let's continue as we will try to call attachAll via IMultipleWrapper } else if (wrapper->attach(drivers[0]->poly)) { return true; } else if (!multiplewrapper) { @@ -438,7 +438,7 @@ bool yarp::robotinterface::Device::attach(const yarp::dev::PolyDriverList& drive } if (!multiplewrapper) { - yError() << name() << "is not a multiplewrapper, therefore it cannot have" << ActionTypeToString(ActionTypeAttach) << "actions"; + yError() << name() << "is not derived from IWrapper or IMultipleWrapper, therefore it cannot have" << ActionTypeToString(ActionTypeAttach) << "actions"; return false; }