[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

@@ -84,7 +84,7 @@ class Elevator:
# In this method, we update our simulation of what our elevator is doing
# First, we set our "inputs" (voltages)
self.elevatorSim.setInputVoltage(
self.motorSim.getVelocity() * wpilib.RobotController.getBatteryVoltage()
self.motorSim.getDutyCycle() * wpilib.RobotController.getBatteryVoltage()
)
# Next, we update it. The standard loop time is 20ms.
@@ -120,7 +120,7 @@ class Elevator:
def stop(self) -> None:
"""Stop the control loop and motor output."""
self.motor.set(0.0)
self.motor.setDutyCycle(0.0)
def reset(self) -> None:
"""Reset Exponential profile to begin from current position on enable."""