Skip to content

Commit

Permalink
Pass pointer to handle, fix device instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed May 18, 2018
1 parent 29459c6 commit 2a7459a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/YarpPlugins/AmorControlboard/DeviceDriverImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,22 @@ bool roboticslab::AmorControlboard::open(yarp::os::Searchable& config)
return false;
}

if (config.check("useAmorCartesianController", "instantiate AmorCartesianControl device"))
yarp::os::Value * cartesianControllerName;

if (config.check("cartesianControllerName", cartesianControllerName, "cartesian controller port"))
{
CD_INFO("Using AMOR cartesian controller device.\n");

usingCartesianController = true;

std::string subdevice = "AmorCartesianControl";
yarp::os::Value vHandle(handle, sizeof handle);
yarp::os::Value vHandle(&handle, sizeof handle);
yarp::os::Property cartesianControllerOptions;

cartesianControllerOptions.fromString((config.toString()));
cartesianControllerOptions.put("device", "CartesianControlServer");
cartesianControllerOptions.put("subdevice", subdevice);
cartesianControllerOptions.put("name", cartesianControllerName->asString());
cartesianControllerOptions.put("handle", vHandle);
cartesianControllerOptions.setMonitor(config.getMonitor(), subdevice.c_str());

Expand Down

0 comments on commit 2a7459a

Please sign in to comment.