[robotpy] Fixup errors missed in #8479 (#8660)

Looks like a race condition happened in the landing of the examples PR
and #8479 which caused some of the python examples to fail.
This commit is contained in:
PJ Reiniger
2026-03-07 00:21:43 -05:00
committed by GitHub
parent b29bde123f
commit ccfb3ab1cd
18 changed files with 55 additions and 55 deletions

View File

@@ -102,7 +102,7 @@ class MyRobot(wpilib.TimedRobot):
# To update our simulation, we set motor voltage inputs, update the
# simulation, and write the simulated velocities to our simulated encoder
self.flywheelSim.setInputVoltage(
self.flywheelMotor.get() * wpilib.RobotController.getInputVoltage()
self.flywheelMotor.getDutyCycle() * wpilib.RobotController.getInputVoltage()
)
self.flywheelSim.update(0.02)
self.encoderSim.setRate(self.flywheelSim.getAngularVelocity())