Skip to content

Commit

Permalink
Retrieve common iPOS options
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jan 17, 2020
1 parent 0fe9e17 commit 61dfba2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libraries/YarpPlugins/TechnosoftIpos/DeviceDriverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ bool TechnosoftIpos::open(yarp::os::Searchable & config)

const auto * robotConfig = *reinterpret_cast<const yarp::os::Property * const *>(config.find("robotConfig").asBlob());

yarp::os::Bottle & commonGroup = robotConfig->findGroup("common-ipos2");
yarp::os::Property iposGroup;

if (!commonGroup.isNull())
{
iposGroup.fromString(commonGroup.toString());
}

iposGroup.fromString(config.toString(), false); // override common options

yarp::os::Bottle & driverGroup = robotConfig->findGroup(config.find("driver").asString());
yarp::os::Bottle & motorGroup = robotConfig->findGroup(config.find("motor").asString());
yarp::os::Bottle & gearboxGroup = robotConfig->findGroup(config.find("gearbox").asString());
Expand Down

0 comments on commit 61dfba2

Please sign in to comment.