Skip to content

Commit

Permalink
Implement VirtualAnalogClient::getAxes to fix compilation against YAR…
Browse files Browse the repository at this point in the history
…P 3.8 (#159)

* Implement VirtualAnalogClient::getAxes to fix compilation against YARP 3.8

* Update CHANGELOG.md

* Update VirtualAnalogClient.cpp

* Update VirtualAnalogClient.cpp
  • Loading branch information
traversaro authored Sep 16, 2022
1 parent 9292513 commit 7b2adcb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +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).

## [0.9.0] - 2022-08-31

Expand Down
12 changes: 12 additions & 0 deletions devices/virtualAnalogClient/VirtualAnalogClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,15 @@ bool VirtualAnalogClient::getJointType(int axis, JointTypeEnum& type)
type = m_axisType[axis];
return true;
}

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

*ax = VirtualAnalogClient::getVirtualAnalogSensorChannels();
return true;
}
1 change: 1 addition & 0 deletions devices/virtualAnalogClient/VirtualAnalogClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class VirtualAnalogClient: 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);
};

}
Expand Down

0 comments on commit 7b2adcb

Please sign in to comment.