From 1200cb0b483f4e9bb38ba5f20f880cec3e949018 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 18:40:33 -0500 Subject: [PATCH 1/8] D --- src/main/java/frc/robot/RobotContainer.java | 12 ++++--- src/main/java/frc/robot/commands/BoutonY.java | 32 +++++++++++++++++++ 2 files changed, 39 insertions(+), 5 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 d947f14..83ea5a4 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -8,7 +8,7 @@ import edu.wpi.first.math.estimator.KalmanFilter; import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.XboxController; - +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; @@ -51,10 +51,12 @@ public class RobotContainer { * edu.wpi.first.wpilibj2.command.button.JoystickButton}. */ private void configureButtonBindings() { - - - - + JoystickButton buttonA = new JoystickButton(manette, XboxController.Button.kA.value); + buttonA.whileHeld(Poussoir); + JoystickButton rightbumper = new JoystickButton(manette, XboxController.Button.kLeftBumper.value); + rightbumper.whileHeld(Pistonshaker); + JoystickButton buttonY = new JoystickButton(manette, XboxController.Button.kY.value); + buttonY.whenPressed(DesactiverBlockeur, ActiverBlockeur); } 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..884458b --- /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 3bd6f484921bb2db5751fb39adecd5944357028a Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 18:41:35 -0500 Subject: [PATCH 2/8] g --- src/main/java/frc/robot/commands/BoutonA.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/main/java/frc/robot/commands/BoutonA.java diff --git a/src/main/java/frc/robot/commands/BoutonA.java b/src/main/java/frc/robot/commands/BoutonA.java new file mode 100644 index 0000000..5490290 --- /dev/null +++ b/src/main/java/frc/robot/commands/BoutonA.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 BoutonA extends CommandBase { + /** Creates a new boutonY. */ + public BoutonA() { + // 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 d2f5238fdf52190cd385442b6d4e1ebf568cbeba Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 18:41:52 -0500 Subject: [PATCH 3/8] h --- src/main/java/frc/robot/commands/BoutonY.java | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/main/java/frc/robot/commands/BoutonY.java 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 884458b..0000000 --- a/src/main/java/frc/robot/commands/BoutonY.java +++ /dev/null @@ -1,32 +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; - -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 aff5567642a8ea2938168998ae1d03b9d54b905d Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 23 Nov 2022 18:46:52 -0500 Subject: [PATCH 4/8] pour les touches --- src/main/java/frc/robot/RobotContainer.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 8ecee90..ce8b1e7 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -9,7 +9,13 @@ import edu.wpi.first.wpilibj.XboxController; import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.RunCommand; +import frc.robot.commands.ActiverBlockeur; +import frc.robot.commands.Activer_poussoir; +import frc.robot.commands.Activershaker; +import frc.robot.commands.DesactiverBlockeur; import frc.robot.subsystems.BasePilotable; +import frc.robot.subsystems.Pistonshaker; +import frc.robot.subsystems.Poussoir; /** * This class is where the bulk of the robot should be declared. Since Command-based is a @@ -23,6 +29,13 @@ public class RobotContainer { BasePilotable basePilotable = new BasePilotable(); + private Pistonshaker pistonshaker = new Pistonshaker(); + private Poussoir poussoir = new Poussoir(); + + private Activer_poussoir activer_poussoir = new Activer_poussoir(poussoir); + private ActiverBlockeur activerBlockeur = new ActiverBlockeur(poussoir); + private Activershaker activershaker = new Activershaker(pistonshaker); + private DesactiverBlockeur desactiverBlockeur = new DesactiverBlockeur(poussoir); /** The container for the robot. Contains subsystems, OI devices, and commands. */ public RobotContainer() { // Configure the button bindings From 7b5f7e6aefe3648ee03e941819edd0e0052203a2 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 23 Nov 2022 18:48:47 -0500 Subject: [PATCH 5/8] 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 6/8] 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); From aa4afdc54306b7a8d9ebaaf987b66d775eb7770f Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 23 Nov 2022 18:51:17 -0500 Subject: [PATCH 7/8] ftf --- simgui.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simgui.json b/simgui.json index 3405fd2..8d5fd7d 100644 --- a/simgui.json +++ b/simgui.json @@ -6,6 +6,13 @@ "/LiveWindow/Ungrouped/MecanumDrive[1]": "MecanumDrive", "/LiveWindow/Ungrouped/Scheduler": "Scheduler", "/LiveWindow/Ungrouped/navX-Sensor[4]": "Gyro" + }, + "windows": { + "/LiveWindow/Ungrouped/MecanumDrive[1]": { + "window": { + "visible": true + } + } } } } From 3d2fed7d28e2c16a03399281bc03d1cf3df4f6d1 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 23 Nov 2022 18:54:36 -0500 Subject: [PATCH 8/8] g --- src/main/java/frc/robot/RobotContainer.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 2858eaf..4c56519 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -19,7 +19,6 @@ 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; @@ -42,10 +41,10 @@ public class RobotContainer { private Pistonshaker pistonshaker = new Pistonshaker(); private Poussoir poussoir = new Poussoir(); - private Activer_poussoir activer_poussoir = new Activer_poussoir(poussoir); - private ActiverBlockeur activerBlockeur = new ActiverBlockeur(poussoir); - private Activershaker activershaker = new Activershaker(pistonshaker); - private DesactiverBlockeur desactiverBlockeur = new DesactiverBlockeur(poussoir); + private Activer_poussoir Activer_poussoir = new Activer_poussoir(poussoir); + private ActiverBlockeur ActiverBlockeur = new ActiverBlockeur(poussoir); + private Activershaker Activershaker = new Activershaker(pistonshaker); + private DesactiverBlockeur DesactiverBlockeur = new DesactiverBlockeur(poussoir); /** The container for the robot. Contains subsystems, OI devices, and commands. */ public RobotContainer() { // Configure the button bindings