[examples] Use left/rightGroup.Get() for simulator inputs to fix inversions (#3908)

This commit is contained in:
modelmat
2022-01-15 07:54:20 +00:00
committed by GitHub
parent 64426502ea
commit 49455199e5
2 changed files with 4 additions and 4 deletions

View File

@@ -144,8 +144,8 @@ public class Drivetrain {
// simulated encoder and gyro. We negate the right side so that positive
// voltages make the right side move forward.
m_drivetrainSimulator.setInputs(
m_leftLeader.get() * RobotController.getInputVoltage(),
m_rightLeader.get() * RobotController.getInputVoltage());
m_leftGroup.get() * RobotController.getInputVoltage(),
m_rightGroup.get() * RobotController.getInputVoltage());
m_drivetrainSimulator.update(0.02);
m_leftEncoderSim.setDistance(m_drivetrainSimulator.getLeftPositionMeters());