mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)
Fixes #8716.
This commit is contained in:
@@ -76,7 +76,7 @@ class Arm:
|
||||
# In this method, we update our simulation of what our arm is doing
|
||||
# First, we set our "inputs" (voltages)
|
||||
self.armSim.setInput(
|
||||
[self.motor.getDutyCycle() * wpilib.RobotController.getBatteryVoltage()]
|
||||
[self.motor.getThrottle() * wpilib.RobotController.getBatteryVoltage()]
|
||||
)
|
||||
|
||||
# Next, we update it. The standard loop time is 20ms.
|
||||
@@ -111,4 +111,4 @@ class Arm:
|
||||
self.motor.setVoltage(pidOutput)
|
||||
|
||||
def stop(self) -> None:
|
||||
self.motor.setDutyCycle(0.0)
|
||||
self.motor.setThrottle(0.0)
|
||||
|
||||
Reference in New Issue
Block a user