Skip to content

Commit

Permalink
robotinterface: Do not print a message if a device does not derive fr…
Browse files Browse the repository at this point in the history
…om IWrapper
  • Loading branch information
traversaro authored Aug 2, 2024
1 parent bde9cd2 commit 037eb8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libYARP_robotinterface/src/yarp/robotinterface/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 037eb8e

Please sign in to comment.