diff --git a/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java b/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java index cd431f7340..ee0b2c79f0 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java +++ b/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java @@ -86,7 +86,8 @@ public class DCMotor { * @return The speed of the motor. */ public double getSpeed(double torqueNm, double voltageInputVolts) { - return voltageInputVolts - 1.0 / KtNMPerAmp * torqueNm * rOhms * KvRadPerSecPerVolt; + return voltageInputVolts * KvRadPerSecPerVolt + - 1.0 / KtNMPerAmp * torqueNm * rOhms * KvRadPerSecPerVolt; } /**