[sim] Use units for voltage and current in RoboRioSim (#2853)

This commit is contained in:
Prateek Machiraju
2020-11-12 01:33:49 -05:00
committed by GitHub
parent ac3c336b98
commit 3c85a40648
5 changed files with 56 additions and 51 deletions

View File

@@ -47,7 +47,7 @@ TEST(StateSpaceSimTest, TestFlywheelSim) {
// Then, SimulationPeriodic runs
frc::sim::RoboRioSim::SetVInVoltage(
frc::sim::BatterySim::Calculate({sim.GetCurrentDraw()}).to<double>());
frc::sim::BatterySim::Calculate({sim.GetCurrentDraw()}));
sim.SetInput(frc::MakeMatrix<1, 1>(
motor.Get() * frc::RobotController::GetInputVoltage()));
sim.Update(20_ms);