mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] PWMSpeedController.get(): Apply Inversion (#3016)
This makes get() return the value actually sent to the motor. This is a breaking change.
This commit is contained in:
@@ -13,7 +13,7 @@ void PWMSpeedController::Set(double speed) {
|
||||
}
|
||||
|
||||
double PWMSpeedController::Get() const {
|
||||
return GetSpeed();
|
||||
return GetSpeed() * (m_isInverted ? -1.0 : 1.0);
|
||||
}
|
||||
|
||||
void PWMSpeedController::SetInverted(bool isInverted) {
|
||||
|
||||
Reference in New Issue
Block a user