diff --git a/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation/cpp/Drivetrain.cpp b/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation/cpp/Drivetrain.cpp index 20b8bca59e..098b997066 100644 --- a/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation/cpp/Drivetrain.cpp +++ b/wpilibcExamples/src/main/cpp/examples/SimpleDifferentialDriveSimulation/cpp/Drivetrain.cpp @@ -41,9 +41,9 @@ void Drivetrain::SimulationPeriodic() { // simulation, and write the simulated positions and velocities to our // simulated encoder and gyro. We negate the right side so that positive // voltages make the right side move forward. - m_drivetrainSimulator.SetInputs(units::volt_t{m_leftLeader.Get()} * + m_drivetrainSimulator.SetInputs(units::volt_t{m_leftGroup.Get()} * frc::RobotController::GetInputVoltage(), - units::volt_t{m_rightLeader.Get()} * + units::volt_t{m_rightGroup.Get()} * frc::RobotController::GetInputVoltage()); m_drivetrainSimulator.Update(20_ms); diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/simpledifferentialdrivesimulation/Drivetrain.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/simpledifferentialdrivesimulation/Drivetrain.java index db8ab556da..986875a4af 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/simpledifferentialdrivesimulation/Drivetrain.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/simpledifferentialdrivesimulation/Drivetrain.java @@ -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());