This commit is contained in:
Antoine PerreaultE 2023-02-15 19:18:18 -05:00
parent ded3f6018f
commit bf8ee48d48

View File

@ -9,7 +9,9 @@ import edu.wpi.first.wpilibj.XboxController;
import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.RunCommand;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.JoystickButton; import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import edu.wpi.first.wpilibj2.command.button.Trigger;
//subsystems //subsystems
import frc.robot.subsystems.BasePilotable; import frc.robot.subsystems.BasePilotable;
import frc.robot.subsystems.Gratte; import frc.robot.subsystems.Gratte;
@ -57,14 +59,19 @@ public RobotContainer() {
configureBindings(); configureBindings();
basePilotable.setDefaultCommand(brakeOuvre); basePilotable.setDefaultCommand(brakeOuvre);
basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX(), -manette1.getLeftTriggerAxis()+manette1.getRightTriggerAxis(), basePilotable); basePilotable.drive(-manette1.getLeftY(), manette1.getLeftX(), -manette1.getLeftTriggerAxis()+manette1.getRightTriggerAxis());
} }
private void configureBindings() { private void configureBindings() {
XboxController exampleController = new XboxController(2);
Trigger aButton = new JoystickButton(exampleController, XboxController.Button.kY.value);
JoystickButton buttonA = new JoystickButton(manette1, XboxController.Button.kA.value);
buttonA.whenPressed()
} }
public Command getAutonomousCommand() { public Command getAutonomousCommand() {