Skip to content

Commit

Permalink
Remove deprecated YARP control board methods
Browse files Browse the repository at this point in the history
These were no longer called by controlboardwrapper2 anyway.

roboticslab-uc3m/questions-and-answers#16
  • Loading branch information
PeterBowman committed May 1, 2017
1 parent b26f7e9 commit b7ae4ee
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 59 deletions.
26 changes: 0 additions & 26 deletions yarpplugins/FakeControlboard/FakeControlboard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ class FakeControlboard : public yarp::dev::DeviceDriver, public yarp::dev::IPosi
*/
virtual bool getAxes(int *ax);

/** Set position mode. This command
* is required by control boards implementing different
* control methods (e.g. velocity/torque), in some cases
* it can be left empty.
* return true/false on success/failure
*/
virtual bool setPositionMode();

/** Set new reference point for a single axis.
* @param j joint number
* @param ref specifies the new ref point
Expand Down Expand Up @@ -376,15 +368,6 @@ class FakeControlboard : public yarp::dev::DeviceDriver, public yarp::dev::IPosi

// --------- IVelocityControl Declarations. Implementation in IVelocityImpl.cpp ---------

/**
* Set velocity mode. This command
* is required by control boards implementing different
* control methods (e.g. velocity/torque), in some cases
* it can be left empty.
* @return true/false on success failure
*/
virtual bool setVelocityMode();

/**
* Start motion at a given speed, single joint.
* @param j joint number
Expand Down Expand Up @@ -544,15 +527,6 @@ class FakeControlboard : public yarp::dev::DeviceDriver, public yarp::dev::IPosi

// -------- ITorqueControl declarations. Implementation in ITorqueImpl.cpp --------

/**
* Set torque control mode. This command
* is required by control boards implementing different
* control methods (e.g. velocity/torque), in some cases
* it can be left empty.
* @return true/false on success/failure
*/
virtual bool setTorqueMode();

/** Get the reference value of the torque for all joints.
* This is NOT the feedback (see getTorques instead).
* @param t pointer to the array of torque values
Expand Down
6 changes: 6 additions & 0 deletions yarpplugins/FakeControlboard/IControlModeImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

bool teo::FakeControlboard::setPositionMode(int j) {
CD_INFO("(%d)\n",j);
if (modePosVel==0) return true; // Simply return true if we were already in pos mode.
// Do anything additional before setting flag to pos...
if(!stop(j)) {
fprintf(stderr,"[FakeControlboard] warning: setPositionMode() return false; failed to stop joint %d\n",j);
return false;
}
modePosVel = 0;
return true;
}
Expand Down
14 changes: 0 additions & 14 deletions yarpplugins/FakeControlboard/IPositionImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ bool teo::FakeControlboard::getAxes(int *ax) {

// -----------------------------------------------------------------------------

bool teo::FakeControlboard::setPositionMode() {
CD_INFO("\n");
if (modePosVel==0) return true; // Simply return true if we were already in pos mode.
// Do anything additional before setting flag to pos...
if(!stop()) {
fprintf(stderr,"[FakeControlboard] warning: setPositionMode() return false; failed to stop\n");
return false;
}
modePosVel = 0;
return true;
}

// -----------------------------------------------------------------------------

bool teo::FakeControlboard::positionMove(int j, double ref) { // encExposed = ref;
if ((unsigned int)j>axes) {
fprintf(stderr,"[FakeControlboard] error: axis index more than axes.\n");
Expand Down
9 changes: 0 additions & 9 deletions yarpplugins/FakeControlboard/ITorqueImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@

// ------------------- IForceControl Related ------------------------------------


bool teo::FakeControlboard::setTorqueMode() {
CD_INFO("setTorqueMode()\n");
return true;
}

// -----------------------------------------------------------------------------

bool teo::FakeControlboard::getRefTorques(double *t){
return true;
}
Expand All @@ -28,7 +20,6 @@ bool teo::FakeControlboard::setRefTorques(const double *t) {
return true;
}


// -----------------------------------------------------------------------------

bool teo::FakeControlboard::setRefTorque(int j, double t) {
Expand Down
10 changes: 0 additions & 10 deletions yarpplugins/FakeControlboard/IVelocityImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

// ------------------ IVelocity Related ----------------------------------------

bool teo::FakeControlboard::setVelocityMode() {
CD_INFO("\n");
if (modePosVel==1) return true; // Simply return true if we were already in vel mode.
// Do anything additional before setting flag to vel...
modePosVel = 1; // Set flag to vel.
return true;
}

// -----------------------------------------------------------------------------

bool teo::FakeControlboard::velocityMove(int j, double sp) { // velExposed = sp;
if ((unsigned int)j>axes) return false;
if(modePosVel!=1) { // Check if we are in velocity mode.
Expand Down

0 comments on commit b7ae4ee

Please sign in to comment.