mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-09 08:48:02 -06:00
Add Documentation to Commands in RobotContainer.java
This commit is contained in:
@@ -43,6 +43,8 @@ public class RobotContainer {
|
|||||||
|
|
||||||
/* Default Commands */
|
/* Default Commands */
|
||||||
m_robotDrive.setDefaultCommand(new DriveWithJoystick(m_robotDrive, getDriverController()));
|
m_robotDrive.setDefaultCommand(new DriveWithJoystick(m_robotDrive, getDriverController()));
|
||||||
|
// drives the robot with a two-axis input from the driver controller
|
||||||
|
// continually sends updates to the Blinkin LED controller to keep the lights on
|
||||||
m_robotLED.setDefaultCommand(new UpdateLED(m_robotLED));
|
m_robotLED.setDefaultCommand(new UpdateLED(m_robotLED));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,9 +55,13 @@ public class RobotContainer {
|
|||||||
* {@link edu.wpi.first.wpilibj2.command.button.JoystickButton}.
|
* {@link edu.wpi.first.wpilibj2.command.button.JoystickButton}.
|
||||||
*/
|
*/
|
||||||
private void configureButtonBindings() {
|
private void configureButtonBindings() {
|
||||||
|
/* Driver Buttons */
|
||||||
|
//Test command to spin the robot while pressing A on the driver controller
|
||||||
new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON)
|
new JoystickButton(getDriverJoystick(), XboxController.A_BUTTON)
|
||||||
.whenPressed(() -> m_robotDrive.driveWithInput(0, 1))
|
.whenPressed(() -> m_robotDrive.driveWithInput(0, 1))
|
||||||
.whenReleased(new DriveWithJoystick(m_robotDrive, getDriverController()));
|
.whenReleased(new DriveWithJoystick(m_robotDrive, getDriverController()));
|
||||||
|
|
||||||
|
/* Operator Buttons */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user