mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)
Fixes #8716.
This commit is contained in:
@@ -27,13 +27,13 @@ def test_motorcontrollergroup():
|
||||
t2 = wpilib.Talon(8)
|
||||
g = wpilib.MotorControllerGroup(t1, t2)
|
||||
|
||||
g.setDutyCycle(1)
|
||||
assert t1.getDutyCycle() == pytest.approx(1)
|
||||
assert t2.getDutyCycle() == pytest.approx(1)
|
||||
g.setThrottle(1)
|
||||
assert t1.getThrottle() == pytest.approx(1)
|
||||
assert t2.getThrottle() == pytest.approx(1)
|
||||
|
||||
g.setDutyCycle(-1)
|
||||
assert t1.getDutyCycle() == pytest.approx(-1)
|
||||
assert t2.getDutyCycle() == pytest.approx(-1)
|
||||
g.setThrottle(-1)
|
||||
assert t1.getThrottle() == pytest.approx(-1)
|
||||
assert t2.getThrottle() == pytest.approx(-1)
|
||||
|
||||
|
||||
def test_motorcontrollergroup_error():
|
||||
|
||||
Reference in New Issue
Block a user