[wpilib] Clean up simulation physics API (#2739)

Some vestigial functions were never removed, and C++ single-jointed arm
sim was missing a flag for disabling gravity simulation. This is useful
for mechanisms like turrets.

Fixes #2738.
This commit is contained in:
Tyler Veness
2020-09-27 00:13:59 -07:00
committed by GitHub
parent 17d3d2f754
commit fc991cb59c
5 changed files with 43 additions and 30 deletions

View File

@@ -12,7 +12,8 @@
TEST(SingleJointedArmTest, Disabled) {
frc::sim::SingleJointedArmSim sim(frc::DCMotor::Vex775Pro(2), 100, 10_kg,
9.5_in, -180_deg, 0_deg, false, {0.0});
9.5_in, -180_deg, 0_deg, false, {0.0},
true);
sim.ResetState(frc::MakeMatrix<2, 1>(0.0, 0.0));
for (size_t i = 0; i < 12 / 0.02; ++i) {