From 7b5f7e6aefe3648ee03e941819edd0e0052203a2 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 18:48:47 -0500 Subject: [PATCH 1/2] gfgh --- src/main/java/frc/robot/RobotContainer.java | 6 ++++-- src/main/java/frc/robot/commands/BoutonA.java | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 83ea5a4..ed4755e 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -12,14 +12,16 @@ import edu.wpi.first.wpilibj.XboxController.Button; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.RunCommand; import edu.wpi.first.wpilibj2.command.button.JoystickButton; +// subsystems import frc.robot.subsystems.BasePilotable; import frc.robot.subsystems.Poussoir; import frc.robot.subsystems.Pistonshaker; +// commands import frc.robot.commands.Activer_poussoir; import frc.robot.commands.ActiverBlockeur; import frc.robot.commands.DesactiverBlockeur; import frc.robot.commands.Activershaker; - +import frc.robot.commands.BoutonA; /** * This class is where the bulk of the robot should be declared. Since Command-based is a @@ -52,7 +54,7 @@ public class RobotContainer { */ private void configureButtonBindings() { JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value); - buttonA.whileHeld(Poussoir); + buttonA.whileHeld(); JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value); rightbumper.whileHeld(Pistonshaker); JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value); diff --git a/src/main/java/frc/robot/commands/BoutonA.java b/src/main/java/frc/robot/commands/BoutonA.java index 5490290..deb50c4 100644 --- a/src/main/java/frc/robot/commands/BoutonA.java +++ b/src/main/java/frc/robot/commands/BoutonA.java @@ -5,10 +5,13 @@ package frc.robot.commands; import edu.wpi.first.wpilibj2.command.CommandBase; +import frc.robot.subsystems.Poussoir; +import frc.robot.subsystems.Pistonshaker; public class BoutonA extends CommandBase { - /** Creates a new boutonY. */ + /** Creates a new boutonA. */ public BoutonA() { + // Use addRequirements() here to declare subsystem dependencies. } From 96d3591383d721ba0418ba4f278ff9b257819366 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 18:50:14 -0500 Subject: [PATCH 2/2] adsfg --- src/main/java/frc/robot/RobotContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index ed4755e..7a1f049 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -54,7 +54,7 @@ public class RobotContainer { */ private void configureButtonBindings() { JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value); - buttonA.whileHeld(); + buttonA.whileHeld(Activer_poussoir); JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value); rightbumper.whileHeld(Pistonshaker); JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value);