mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[examples] Fix drive Joystick axes in several examples (#3769)
This commit is contained in:
@@ -30,12 +30,14 @@ RobotContainer::RobotContainer() {
|
||||
ConfigureButtonBindings();
|
||||
|
||||
// Set up default drive command
|
||||
// The left stick controls translation of the robot.
|
||||
// Turning is controlled by the X axis of the right stick.
|
||||
m_drive.SetDefaultCommand(frc2::RunCommand(
|
||||
[this] {
|
||||
m_drive.Drive(
|
||||
units::meters_per_second_t(m_driverController.GetLeftY()),
|
||||
units::meters_per_second_t(m_driverController.GetRightY()),
|
||||
units::radians_per_second_t(m_driverController.GetLeftX()), false);
|
||||
units::meters_per_second_t(m_driverController.GetLeftX()),
|
||||
units::radians_per_second_t(m_driverController.GetRightX()), false);
|
||||
},
|
||||
{&m_drive}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user