Skip to content

Commit 3c0028f

Browse files
committed
add simulation support for CANSparkMax.setVoltage
1 parent 3ee1d52 commit 3c0028f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/frc/robot/lib/sim/MockSparkMax.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,8 @@ public REVLibError setSmartCurrentLimit(int limit) {
111111
public SparkMaxPIDController getPIDController() {
112112
return pidController;
113113
}
114+
115+
public void setVoltage(double outputVolts) {
116+
set(outputVolts / 12);
117+
}
114118
}

0 commit comments

Comments
 (0)