mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[examples] Fix drive Joystick axes in several examples (#3769)
This commit is contained in:
@@ -50,7 +50,7 @@ public class RobotContainer {
|
||||
new RunCommand(
|
||||
() ->
|
||||
m_robotDrive.arcadeDrive(
|
||||
-m_driverController.getRightY(), m_driverController.getLeftX()),
|
||||
-m_driverController.getLeftY(), m_driverController.getRightX()),
|
||||
m_robotDrive));
|
||||
}
|
||||
|
||||
|
||||
@@ -42,16 +42,15 @@ public class RobotContainer {
|
||||
configureButtonBindings();
|
||||
|
||||
// Configure default commands
|
||||
// Set the default drive command to split-stick arcade drive
|
||||
m_robotDrive.setDefaultCommand(
|
||||
// A split-stick arcade command, with forward/backward controlled by the left
|
||||
// hand, and turning controlled by the right.
|
||||
// The left stick controls translation of the robot.
|
||||
// Turning is controlled by the X axis of the right stick.
|
||||
new RunCommand(
|
||||
() ->
|
||||
m_robotDrive.drive(
|
||||
m_driverController.getLeftY(),
|
||||
m_driverController.getRightX(),
|
||||
m_driverController.getLeftX(),
|
||||
m_driverController.getRightX(),
|
||||
false),
|
||||
m_robotDrive));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user