mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[examples] Ensure right side motors are inverted (#3836)
Fixes #3827 Adds MotorController inversion for right side, removes inversion in setVoltage methods. Also fixes various XboxController negations (was inconsistent throughout examples).
This commit is contained in:
@@ -43,7 +43,7 @@ void Drivetrain::SimulationPeriodic() {
|
||||
// voltages make the right side move forward.
|
||||
m_drivetrainSimulator.SetInputs(units::volt_t{m_leftLeader.Get()} *
|
||||
frc::RobotController::GetInputVoltage(),
|
||||
units::volt_t{-m_rightLeader.Get()} *
|
||||
units::volt_t{m_rightLeader.Get()} *
|
||||
frc::RobotController::GetInputVoltage());
|
||||
m_drivetrainSimulator.Update(20_ms);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user