mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Remove deprecated code (#8656)
This commit is contained in:
@@ -62,25 +62,3 @@ wpi::units::radian_t XRPServo::GetAngle() const {
|
||||
|
||||
return 90_deg;
|
||||
}
|
||||
|
||||
void XRPServo::SetPosition(double pos) {
|
||||
if (pos < 0.0) {
|
||||
pos = 0.0;
|
||||
}
|
||||
|
||||
if (pos > 1.0) {
|
||||
pos = 1.0;
|
||||
}
|
||||
|
||||
if (m_simPosition) {
|
||||
m_simPosition.Set(pos);
|
||||
}
|
||||
}
|
||||
|
||||
double XRPServo::GetPosition() const {
|
||||
if (m_simPosition) {
|
||||
return m_simPosition.Get();
|
||||
}
|
||||
|
||||
return 0.5;
|
||||
}
|
||||
|
||||
@@ -46,24 +46,6 @@ class XRPServo {
|
||||
*/
|
||||
wpi::units::radian_t GetAngle() const;
|
||||
|
||||
/**
|
||||
* Set the servo position.
|
||||
*
|
||||
* @param position Desired position (Between 0.0 and 1.0)
|
||||
* @deprecated Use SetAngle() instead
|
||||
*/
|
||||
[[deprecated("Use SetAngle() instead")]]
|
||||
void SetPosition(double position);
|
||||
|
||||
/**
|
||||
* Get the servo position.
|
||||
*
|
||||
* @return Current servo position
|
||||
* @deprecated Use GetAngle() instead
|
||||
*/
|
||||
[[deprecated("Use GetAngle() instead")]]
|
||||
double GetPosition() const;
|
||||
|
||||
private:
|
||||
hal::SimDevice m_simDevice;
|
||||
hal::SimDouble m_simPosition;
|
||||
|
||||
@@ -4,5 +4,3 @@ classes:
|
||||
XRPServo:
|
||||
SetAngle:
|
||||
GetAngle:
|
||||
SetPosition:
|
||||
GetPosition:
|
||||
|
||||
Reference in New Issue
Block a user