Skip to content

Commit

Permalink
Rename deprecated YARP motor interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed May 22, 2019
1 parent 9600e49 commit e26db48
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 18 deletions.
6 changes: 3 additions & 3 deletions examples/cpp/examplePositionDirect/examplePositionDirect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ int main(int argc, char *argv[]) {
}

IPositionDirect *posdir;
IPositionControl2 *pos;
IVelocityControl2 *vel;
IPositionControl *pos;
IVelocityControl *vel;
IEncoders *enc;
IControlMode2 *mode;
IControlMode *mode;

bool ok = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ int main(int argc, char *argv[]) {
return 1;
}

IPositionControl2 *pos;
IVelocityControl2 *vel;
IPositionControl *pos;
IVelocityControl *vel;
IEncodersTimed *enc;
IControlMode2 *mode;
IControlMode *mode;

bool ok = true;
ok &= dd.view(pos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ int ExampleRemoteControlboard::run(int argc, char **argv)
std::printf("[error] Problems acquiring position interface\n");
return 1;
}
if ( ! dd.view(pos2) ) // connect 'pos2' interface to 'dd' device
{
std::printf("[error] Problems acquiring position interface\n");
return 1;
}
std::printf("[success] Acquired position interface\n");

if ( ! dd.view(enc) ) // connect 'enc' interface to 'dd' device
Expand Down Expand Up @@ -170,7 +165,7 @@ int ExampleRemoteControlboard::run(int argc, char **argv)
std::vector<int> mask(2,1);
q[0] = -3.0;
q[1] = -3.0;
pos2->positionMove( 2, mask.data(), q.data() );
pos->positionMove( 2, mask.data(), q.data() );
std::printf("Wait to reach");
bool done = false;
while(!done)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ExampleRemoteControlboard
yarp::os::Network yarp; // connect to YARP network
yarp::dev::PolyDriver dd; //create a YARP multi-use driver
yarp::dev::IPositionControl *pos; //make a position controller object we call 'pos'
yarp::dev::IPositionControl2 *pos2; //make a position controller 2 object we call 'pos2'
yarp::dev::IEncoders *enc; //make an encoder controller object we call 'enc'
yarp::dev::IVelocityControl *vel; //make a velocity controller object we call 'vel'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int main(int argc, char *argv[])
}
else std::printf("[success] Viewing IVelocityControlRaw.\n");

yarp::dev::IControlMode2Raw *mode;
yarp::dev::IControlModeRaw *mode;
ok = dd.view(mode);
if (!ok)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
dd = yarp.PolyDriver(options)

# View driver as FrameGrabber
controls = dd.viewIFrameGrabberControls2()
controls = dd.viewIFrameGrabberControls()

# Check if a feature exists
print(controls.hasFeature(yarp.YARP_FEATURE_GAIN))
Expand Down
4 changes: 2 additions & 2 deletions examples/python/exampleRemoteControlboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This example connects to a running \ref controlboardWrapper to move in Joint space.
#
# <b>Requires YARP 2.3.72.</b>
# <b>Requires YARP 3.0.</b>
#
# <b>Legal</b>
#
Expand Down Expand Up @@ -49,7 +49,7 @@
pos = dd.viewIPositionControl() # make a position controller object we call 'pos'
vel = dd.viewIVelocityControl() # make a velocity controller object we call 'vel'
enc = dd.viewIEncoders() # make an encoder controller object we call 'enc'
mode = dd.viewIControlMode2() # make a operation mode controller object we call 'mode'
mode = dd.viewIControlMode() # make a operation mode controller object we call 'mode'
ll = dd.viewIControlLimits() # make a limits controller object we call 'll'

axes = enc.getAxes() # retrieve number of joints
Expand Down
1 change: 0 additions & 1 deletion examples/python/exampleRemoteJr3.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@
print '[%s]' % ', '.join(map(str, vector_list))

print 'bye!'

0 comments on commit e26db48

Please sign in to comment.