From e26db48e8a0d6582df8ca18583b55f8b3bfba898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20=C5=81ukawski?= Date: Wed, 22 May 2019 16:29:11 +0200 Subject: [PATCH] Rename deprecated YARP motor interfaces --- .../cpp/examplePositionDirect/examplePositionDirect.cpp | 6 +++--- .../exampleRemoteControlboard.cpp | 6 +++--- .../ExampleRemoteControlboard.cpp | 7 +------ .../ExampleRemoteControlboard.hpp | 1 - .../cpp/exampleTechnosoftIpos/exampleTechnosoftIpos.cpp | 2 +- ...GrabberControls2.py => exampleIFrameGrabberControls.py} | 2 +- examples/python/exampleRemoteControlboard.py | 4 ++-- examples/python/exampleRemoteJr3.py | 1 - 8 files changed, 11 insertions(+), 18 deletions(-) rename examples/python/{exampleIFrameGrabberControls2.py => exampleIFrameGrabberControls.py} (94%) diff --git a/examples/cpp/examplePositionDirect/examplePositionDirect.cpp b/examples/cpp/examplePositionDirect/examplePositionDirect.cpp index 146e92b15..3d2a15e19 100644 --- a/examples/cpp/examplePositionDirect/examplePositionDirect.cpp +++ b/examples/cpp/examplePositionDirect/examplePositionDirect.cpp @@ -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; diff --git a/examples/cpp/exampleRemoteControlboard/exampleRemoteControlboard.cpp b/examples/cpp/exampleRemoteControlboard/exampleRemoteControlboard.cpp index ad475b733..366cec80e 100644 --- a/examples/cpp/exampleRemoteControlboard/exampleRemoteControlboard.cpp +++ b/examples/cpp/exampleRemoteControlboard/exampleRemoteControlboard.cpp @@ -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); diff --git a/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.cpp b/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.cpp index 19a4bf68d..d7a9c5df7 100644 --- a/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.cpp +++ b/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.cpp @@ -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 @@ -170,7 +165,7 @@ int ExampleRemoteControlboard::run(int argc, char **argv) std::vector 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) diff --git a/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.hpp b/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.hpp index 8ed68ac64..8bab52570 100644 --- a/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.hpp +++ b/examples/cpp/exampleRemoteControlboardModule/ExampleRemoteControlboard.hpp @@ -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' }; diff --git a/examples/cpp/exampleTechnosoftIpos/exampleTechnosoftIpos.cpp b/examples/cpp/exampleTechnosoftIpos/exampleTechnosoftIpos.cpp index 1984453df..ef821ff37 100644 --- a/examples/cpp/exampleTechnosoftIpos/exampleTechnosoftIpos.cpp +++ b/examples/cpp/exampleTechnosoftIpos/exampleTechnosoftIpos.cpp @@ -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) { diff --git a/examples/python/exampleIFrameGrabberControls2.py b/examples/python/exampleIFrameGrabberControls.py similarity index 94% rename from examples/python/exampleIFrameGrabberControls2.py rename to examples/python/exampleIFrameGrabberControls.py index b6ed103dc..1c31107a3 100644 --- a/examples/python/exampleIFrameGrabberControls2.py +++ b/examples/python/exampleIFrameGrabberControls.py @@ -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)) diff --git a/examples/python/exampleRemoteControlboard.py b/examples/python/exampleRemoteControlboard.py index 76e4b3374..d95b93ee8 100644 --- a/examples/python/exampleRemoteControlboard.py +++ b/examples/python/exampleRemoteControlboard.py @@ -6,7 +6,7 @@ # # This example connects to a running \ref controlboardWrapper to move in Joint space. # -# Requires YARP 2.3.72. +# Requires YARP 3.0. # # Legal # @@ -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 diff --git a/examples/python/exampleRemoteJr3.py b/examples/python/exampleRemoteJr3.py index 8533d23d1..032f0d294 100644 --- a/examples/python/exampleRemoteJr3.py +++ b/examples/python/exampleRemoteJr3.py @@ -42,4 +42,3 @@ print '[%s]' % ', '.join(map(str, vector_list)) print 'bye!' -