From a6f0d7d09447932d907c3ff818ee2b3228d00a0b Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 19:14:20 -0500 Subject: [PATCH 1/6] adsf --- src/main/java/frc/robot/RobotContainer.java | 7 ++++--- src/main/java/frc/robot/commands/BoutonA.java | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 4c56519..155eaca 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -19,6 +19,7 @@ import frc.robot.subsystems.Pistonshaker; // commands import frc.robot.commands.Activer_poussoir; import frc.robot.commands.ActiverBlockeur; +import frc.robot.commands.Activer_poussoir; import frc.robot.commands.Activershaker; import frc.robot.commands.DesactiverBlockeur; @@ -66,13 +67,13 @@ public class RobotContainer { JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value); buttonA.whileHeld(Activer_poussoir); JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value); - rightbumper.whileHeld(Pistonshaker); + rightbumper.whileHeld(Activershaker); JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value); - buttonY.whenPressed(DesactiverBlockeur, ActiverBlockeur); + buttonY.whenPressed(DesactiverBlockeur); } - /** + /** * Use this to pass the autonomous command to the main {@link Robot} class. * * @return the command to run in autonomous diff --git a/src/main/java/frc/robot/commands/BoutonA.java b/src/main/java/frc/robot/commands/BoutonA.java index deb50c4..347895d 100644 --- a/src/main/java/frc/robot/commands/BoutonA.java +++ b/src/main/java/frc/robot/commands/BoutonA.java @@ -9,15 +9,22 @@ import frc.robot.subsystems.Poussoir; import frc.robot.subsystems.Pistonshaker; public class BoutonA extends CommandBase { + private Poussoir poussoir; + private Pistonshaker pistonshaker; /** Creates a new boutonA. */ - public BoutonA() { - + public BoutonA(Poussoir poussoir, Pistonshaker pistonshaker) { + this.poussoir = poussoir; + this.pistonshaker = pistonshaker; + addRequirements(poussoir, pistonshaker); // Use addRequirements() here to declare subsystem dependencies. } // Called when the command is initially scheduled. @Override - public void initialize() {} + public void initialize() { + poussoir.pousser(); + pistonshaker.rentrerpiston(); + } // Called every time the scheduler runs while the command is scheduled. @Override @@ -25,9 +32,11 @@ public class BoutonA extends CommandBase { // Called once the command ends or is interrupted. @Override - public void end(boolean interrupted) {} + public void end(boolean interrupted) { + poussoir.tirer(); + pistonshaker.sortirpiston(); - // Returns true when the command should end. + } @Override public boolean isFinished() { return false; From 9e3770a4e38471708363b847a1ce86df1f1de9b8 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 19:25:55 -0500 Subject: [PATCH 2/6] fs --- src/main/java/frc/robot/RobotContainer.java | 4 +-- src/main/java/frc/robot/commands/BoutonY.java | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 src/main/java/frc/robot/commands/BoutonY.java diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index aca5cfb..e6c2548 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -55,7 +55,7 @@ public class RobotContainer { private Pistonshaker pistonshaker = new Pistonshaker(); private Poussoir poussoir = new Poussoir(); - private Activer_poussoir Activer_poussoir = new Activer_poussoir(poussoir); + private BoutonA BoutonA = new BoutonA(poussoir,pistonshaker); private ActiverBlockeur ActiverBlockeur = new ActiverBlockeur(poussoir); private Activershaker Activershaker = new Activershaker(pistonshaker); private DesactiverBlockeur DesactiverBlockeur = new DesactiverBlockeur(poussoir); @@ -78,7 +78,7 @@ public class RobotContainer { */ private void configureButtonBindings() { JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value); - buttonA.whileHeld(Activer_poussoir); + buttonA.whileHeld(BoutonA); JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value); rightbumper.whileHeld(Activershaker); JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value); diff --git a/src/main/java/frc/robot/commands/BoutonY.java b/src/main/java/frc/robot/commands/BoutonY.java new file mode 100644 index 0000000..2d2b920 --- /dev/null +++ b/src/main/java/frc/robot/commands/BoutonY.java @@ -0,0 +1,32 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc.robot.commands; + +import edu.wpi.first.wpilibj2.command.CommandBase; + +public class BoutonY extends CommandBase { + /** Creates a new BoutonY. */ + public BoutonY() { + // Use addRequirements() here to declare subsystem dependencies. + } + + // Called when the command is initially scheduled. + @Override + public void initialize() {} + + // Called every time the scheduler runs while the command is scheduled. + @Override + public void execute() {} + + // Called once the command ends or is interrupted. + @Override + public void end(boolean interrupted) {} + + // Returns true when the command should end. + @Override + public boolean isFinished() { + return false; + } +} From 5b1ddd9236b35bbd0f327d1079c34d0c34a403b9 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 19:26:01 -0500 Subject: [PATCH 3/6] f --- src/main/java/frc/robot/commands/BoutonY.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/commands/BoutonY.java b/src/main/java/frc/robot/commands/BoutonY.java index 2d2b920..c9e1288 100644 --- a/src/main/java/frc/robot/commands/BoutonY.java +++ b/src/main/java/frc/robot/commands/BoutonY.java @@ -5,10 +5,13 @@ package frc.robot.commands; import edu.wpi.first.wpilibj2.command.CommandBase; - +import frc.robot.subsystems.Poussoir; public class BoutonY extends CommandBase { + private Poussoir poussoir; /** Creates a new BoutonY. */ - public BoutonY() { + public BoutonY(Poussoir poussoir) { + this.poussoir = poussoir; + addRequirements(poussoir); // Use addRequirements() here to declare subsystem dependencies. } From b662ccd75935b4f88a03fd9b8cab9e956747a805 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 19:36:02 -0500 Subject: [PATCH 4/6] DFSGD --- src/main/java/frc/robot/RobotContainer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index e6c2548..9a7f06e 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -83,12 +83,12 @@ public class RobotContainer { rightbumper.whileHeld(Activershaker); JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value); buttonY.whenPressed(DesactiverBlockeur); - + } /** * Use this to pass the autonomous command to the main {@link Robot} class. - * + * @return the command to run in autonomous */ public Command getAutonomousCommand() { From 9e78c089be4c9bbc5c9041e2d07be9d87646dd53 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 19:40:04 -0500 Subject: [PATCH 5/6] dasd --- src/main/java/frc/robot/RobotContainer.java | 3 +- src/main/java/frc/robot/commands/BoutonY.java | 35 ------------------- 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 src/main/java/frc/robot/commands/BoutonY.java diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 9a7f06e..68127f1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -83,7 +83,8 @@ public class RobotContainer { rightbumper.whileHeld(Activershaker); JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value); buttonY.whenPressed(DesactiverBlockeur); - + JoystickButton buttonX = new JoystickButton(manette, XboxController.Button.kX.value); + buttonX.whenPressed(ActiverBlockeur); } /** diff --git a/src/main/java/frc/robot/commands/BoutonY.java b/src/main/java/frc/robot/commands/BoutonY.java deleted file mode 100644 index c9e1288..0000000 --- a/src/main/java/frc/robot/commands/BoutonY.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. - -package frc.robot.commands; - -import edu.wpi.first.wpilibj2.command.CommandBase; -import frc.robot.subsystems.Poussoir; -public class BoutonY extends CommandBase { - private Poussoir poussoir; - /** Creates a new BoutonY. */ - public BoutonY(Poussoir poussoir) { - this.poussoir = poussoir; - addRequirements(poussoir); - // Use addRequirements() here to declare subsystem dependencies. - } - - // Called when the command is initially scheduled. - @Override - public void initialize() {} - - // Called every time the scheduler runs while the command is scheduled. - @Override - public void execute() {} - - // Called once the command ends or is interrupted. - @Override - public void end(boolean interrupted) {} - - // Returns true when the command should end. - @Override - public boolean isFinished() { - return false; - } -} From 869bfef8ba736e41bb36cd549d19ffe8bd68c766 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 19:45:44 -0500 Subject: [PATCH 6/6] h --- src/main/java/frc/robot/RobotContainer.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 68127f1..3f2af21 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -20,21 +20,13 @@ import frc.robot.subsystems.Pistonshaker; // commands import frc.robot.commands.Activer_poussoir; import frc.robot.commands.ActiverBlockeur; -<<<<<<< HEAD -import frc.robot.commands.Activer_poussoir; -======= -<<<<<<< HEAD import frc.robot.commands.DesactiverBlockeur; import frc.robot.commands.Reculer; import frc.robot.commands.TournerDroite; import frc.robot.commands.TournerGauche; import frc.robot.commands.Activershaker; import frc.robot.commands.Avancer; -======= ->>>>>>> db39b5c3db06eed46b45655b80bb22a24e971bb2 -import frc.robot.commands.Activershaker; -import frc.robot.commands.DesactiverBlockeur; ->>>>>>> 3d2fed7d28e2c16a03399281bc03d1cf3df4f6d1 +