mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)
Fixes #8716.
This commit is contained in:
@@ -134,7 +134,7 @@ TEST_P(ArmSimulationTest, Teleop) {
|
||||
|
||||
wpi::sim::StepTiming(3_s);
|
||||
|
||||
ASSERT_NEAR(0.0, m_motorSim.GetDutyCycle(), 0.05);
|
||||
ASSERT_NEAR(0.0, m_motorSim.GetThrottle(), 0.05);
|
||||
EXPECT_NEAR(kMinAngle.value(), m_encoderSim.GetDistance(), 2.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ TEST_F(ElevatorSimulationTest, Teleop) {
|
||||
// advance 75 timesteps
|
||||
wpi::sim::StepTiming(1.5_s);
|
||||
|
||||
ASSERT_NEAR(0.0, m_motorSim.GetDutyCycle(), 0.05);
|
||||
ASSERT_NEAR(0.0, m_motorSim.GetThrottle(), 0.05);
|
||||
ASSERT_NEAR(0.0, m_encoderSim.GetDistance(), 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ TEST_F(IntakeTest, DoesntWorkWhenClosed) {
|
||||
EXPECT_DOUBLE_EQ(
|
||||
0.0,
|
||||
simMotor
|
||||
.GetDutyCycle()); // make sure that the value set to the motor is 0
|
||||
.GetThrottle()); // make sure that the value set to the motor is 0
|
||||
}
|
||||
|
||||
TEST_F(IntakeTest, WorksWhenOpen) {
|
||||
intake.Deploy();
|
||||
intake.Activate(0.5);
|
||||
EXPECT_DOUBLE_EQ(0.5, simMotor.GetDutyCycle());
|
||||
EXPECT_DOUBLE_EQ(0.5, simMotor.GetThrottle());
|
||||
}
|
||||
|
||||
TEST_F(IntakeTest, Retract) {
|
||||
|
||||
Reference in New Issue
Block a user