mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[examples] Use left/rightGroup.Get() for simulator inputs to fix inversions (#3908)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user