Skip to content

Commit

Permalink
Implement VirtualAnalogRemapper::getAxes to fix compilation with YARP…
Browse files Browse the repository at this point in the history
… 3.8 (#160)

* Implement VirtualAnalogRemapper::getAxes

* Update CHANGELOG.md

* Fix VirtualAnalogRemapper::getAxes implementation
  • Loading branch information
traversaro committed Sep 19, 2022
1 parent 7b2adcb commit c46c185
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Fixed
- Implement VirtualAnalogClient::getAxes to fix compilation against YARP 3.8 (https://github.com/robotology/whole-body-estimators/pull/159).
- Implement `VirtualAnalogClient::getAxes` and `VirtualAnalogRemapper::getAxes` to fix compilation against YARP 3.8 (https://github.com/robotology/whole-body-estimators/pull/159, https://github.com/robotology/whole-body-estimators/pull/160).

## [0.9.0] - 2022-08-31

Expand Down
12 changes: 12 additions & 0 deletions devices/virtualAnalogRemapper/VirtualAnalogRemapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,3 +343,15 @@ bool VirtualAnalogRemapper::getJointType(int axis, JointTypeEnum& type)
}
return ret;
}

bool VirtualAnalogRemapper::getAxes(int* ax)
{
if( !ax )
{
yError() << "VirtualAnalogRemapper: getAxes failed : invalid argument passed";
return false;
}

*ax = this->m_axesNames.size();
return true;
}
1 change: 1 addition & 0 deletions devices/virtualAnalogRemapper/VirtualAnalogRemapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class VirtualAnalogRemapper: public DeviceDriver,
/** IAxisInfo methods (documented in IVirtualAnalogSensor class) */
virtual bool getAxisName(int axis, std::string& name);
virtual bool getJointType(int axis, yarp::dev::JointTypeEnum& type);
virtual bool getAxes(int* ax);

/** IMultipleWrapper methods (documented in IMultipleWrapper */
virtual bool attachAll(const PolyDriverList &p);
Expand Down

0 comments on commit c46c185

Please sign in to comment.