mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)
Fixes #8716.
This commit is contained in:
@@ -142,7 +142,7 @@ class ArmSimulationTest {
|
||||
// advance 75 timesteps
|
||||
SimHooks.stepTiming(3.5);
|
||||
|
||||
assertEquals(0.0, m_motorSim.getDutyCycle(), 0.01);
|
||||
assertEquals(0.0, m_motorSim.getThrottle(), 0.01);
|
||||
assertEquals(Constants.kMinAngleRads, m_encoderSim.getDistance(), 2.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ class ElevatorSimulationTest {
|
||||
// advance 75 timesteps
|
||||
SimHooks.stepTiming(1.5);
|
||||
|
||||
assertEquals(0.0, m_motorSim.getDutyCycle(), 0.05);
|
||||
assertEquals(0.0, m_motorSim.getThrottle(), 0.05);
|
||||
assertEquals(0.0, m_encoderSim.getDistance(), 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,14 +47,14 @@ class IntakeTest {
|
||||
m_intake.retract(); // close the intake
|
||||
m_intake.activate(0.5); // try to activate the motor
|
||||
assertEquals(
|
||||
0.0, m_simMotor.getDutyCycle(), DELTA); // make sure that the value set to the motor is 0
|
||||
0.0, m_simMotor.getThrottle(), DELTA); // make sure that the value set to the motor is 0
|
||||
}
|
||||
|
||||
@Test
|
||||
void worksWhenOpen() {
|
||||
m_intake.deploy();
|
||||
m_intake.activate(0.5);
|
||||
assertEquals(0.5, m_simMotor.getDutyCycle(), DELTA);
|
||||
assertEquals(0.5, m_simMotor.getThrottle(), DELTA);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user