mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilibc] Fix compilation failure (#8431)
This commit is contained in:
@@ -130,10 +130,10 @@ class ElevatorSimTest {
|
||||
var motor = DCMotor.getKrakenX60(2);
|
||||
var sim = new ElevatorSim(motor, 20, 8.0, 0.1, 0.0, 1.0, true, 0.0, 0.01, 0.0);
|
||||
|
||||
assertEquals(0.0, sim.getCurrentDrawAmps());
|
||||
assertEquals(0.0, sim.getCurrentDraw());
|
||||
sim.setInputVoltage(motor.getVoltage(motor.getTorque(60.0), 0.0));
|
||||
sim.update(0.100);
|
||||
// current draw should start at 60 A and decrease as the back emf catches up
|
||||
assertTrue(0.0 < sim.getCurrentDrawAmps() && sim.getCurrentDrawAmps() < 60.0);
|
||||
// Current draw should start at 60 A and decrease as the back-EMF catches up
|
||||
assertTrue(0.0 < sim.getCurrentDraw() && sim.getCurrentDraw() < 60.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user