From b7eecbaea95e26aaca16c340d9622ff0a1407dae Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Thu, 27 Feb 2025 18:33:08 -0500 Subject: [PATCH] Menage pour mieu se trouver --- src/main/java/frc/robot/RobotContainer.java | 12 ++--- src/main/java/frc/robot/commands/Depart.java | 2 +- .../{ => Elevateur}/ElevateurManuel.java | 2 +- .../robot/commands/{ => Elevateur}/L2.java | 5 +- .../robot/commands/{ => Elevateur}/L3.java | 2 +- .../robot/commands/{ => Elevateur}/L4.java | 2 +- .../commands/{ => Pince}/DepartPince.java | 2 +- .../commands/{ => Pince}/PinceManuel.java | 2 +- .../java/frc/robot/commands/PinceManuel2.java | 47 ------------------- .../commands/{ => grimpeur}/GrimperHaut.java | 2 +- .../commands/{ => grimpeur}/GrimpeurBas.java | 2 +- .../{ => grimpeur}/GrimpeurManuel.java | 2 +- .../{ => grimpeur}/ResetGrimpeur.java | 2 +- 13 files changed, 16 insertions(+), 68 deletions(-) rename src/main/java/frc/robot/commands/{ => Elevateur}/ElevateurManuel.java (97%) rename src/main/java/frc/robot/commands/{ => Elevateur}/L2.java (97%) rename src/main/java/frc/robot/commands/{ => Elevateur}/L3.java (98%) rename src/main/java/frc/robot/commands/{ => Elevateur}/L4.java (98%) rename src/main/java/frc/robot/commands/{ => Pince}/DepartPince.java (97%) rename src/main/java/frc/robot/commands/{ => Pince}/PinceManuel.java (97%) delete mode 100644 src/main/java/frc/robot/commands/PinceManuel2.java rename src/main/java/frc/robot/commands/{ => grimpeur}/GrimperHaut.java (97%) rename src/main/java/frc/robot/commands/{ => grimpeur}/GrimpeurBas.java (98%) rename src/main/java/frc/robot/commands/{ => grimpeur}/GrimpeurManuel.java (97%) rename src/main/java/frc/robot/commands/{ => grimpeur}/ResetGrimpeur.java (97%) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index abee378..69953ad 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -27,21 +27,20 @@ import frc.robot.TunerConstants.TunerConstants; import frc.robot.commands.AprilTag3; import frc.robot.commands.AprilTag3G; import frc.robot.commands.Depart; -import frc.robot.commands.ElevateurManuel; import frc.robot.commands.Forme3; -import frc.robot.commands.L2; -import frc.robot.commands.L3; -import frc.robot.commands.L4; -import frc.robot.commands.PinceManuel; -import frc.robot.commands.PinceManuel2; import frc.robot.commands.RainBow; import frc.robot.commands.StationPince; import frc.robot.commands.reset; +import frc.robot.commands.Elevateur.ElevateurManuel; +import frc.robot.commands.Elevateur.L2; +import frc.robot.commands.Elevateur.L3; +import frc.robot.commands.Elevateur.L4; import frc.robot.commands.Pince.AlgueExpire; import frc.robot.commands.Pince.Algue_inspire; import frc.robot.commands.Pince.CorailAspir; import frc.robot.commands.Pince.CoralAlgueInspire; import frc.robot.commands.Pince.CoralExpire; +import frc.robot.commands.Pince.PinceManuel; import frc.robot.subsystems.Bougie; import frc.robot.subsystems.CommandSwerveDrivetrain; import frc.robot.subsystems.Elevateur; @@ -74,7 +73,6 @@ public class RobotContainer { Pince pince = new Pince(); ElevateurManuel elevateurManuel = new ElevateurManuel(elevateur, manette2::getLeftY); PinceManuel pinceManuel = new PinceManuel(pince,manette2::getRightY); - PinceManuel2 pinceManuel2 = new PinceManuel2(pince); Bougie bougie = new Bougie(); Limelight3G limelight3g = new Limelight3G(); Limelight3 limelight3 = new Limelight3(); diff --git a/src/main/java/frc/robot/commands/Depart.java b/src/main/java/frc/robot/commands/Depart.java index f5322dd..f624039 100644 --- a/src/main/java/frc/robot/commands/Depart.java +++ b/src/main/java/frc/robot/commands/Depart.java @@ -47,6 +47,6 @@ public class Depart extends Command { // Returns true when the command should end. @Override public boolean isFinished() { - return elevateur.limit2()==true; + return elevateur.limit2() == true; } } diff --git a/src/main/java/frc/robot/commands/ElevateurManuel.java b/src/main/java/frc/robot/commands/Elevateur/ElevateurManuel.java similarity index 97% rename from src/main/java/frc/robot/commands/ElevateurManuel.java rename to src/main/java/frc/robot/commands/Elevateur/ElevateurManuel.java index f86268a..682fdc6 100644 --- a/src/main/java/frc/robot/commands/ElevateurManuel.java +++ b/src/main/java/frc/robot/commands/Elevateur/ElevateurManuel.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.Elevateur; import java.util.function.DoubleSupplier; diff --git a/src/main/java/frc/robot/commands/L2.java b/src/main/java/frc/robot/commands/Elevateur/L2.java similarity index 97% rename from src/main/java/frc/robot/commands/L2.java rename to src/main/java/frc/robot/commands/Elevateur/L2.java index fb6286f..936771c 100644 --- a/src/main/java/frc/robot/commands/L2.java +++ b/src/main/java/frc/robot/commands/Elevateur/L2.java @@ -2,10 +2,7 @@ // 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 java.util.function.DoubleSupplier; - +package frc.robot.commands.Elevateur; import edu.wpi.first.networktables.DoubleSubscriber; import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableInstance; diff --git a/src/main/java/frc/robot/commands/L3.java b/src/main/java/frc/robot/commands/Elevateur/L3.java similarity index 98% rename from src/main/java/frc/robot/commands/L3.java rename to src/main/java/frc/robot/commands/Elevateur/L3.java index 43635ac..b653c77 100644 --- a/src/main/java/frc/robot/commands/L3.java +++ b/src/main/java/frc/robot/commands/Elevateur/L3.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.Elevateur; import edu.wpi.first.networktables.DoubleSubscriber; import edu.wpi.first.networktables.NetworkTable; diff --git a/src/main/java/frc/robot/commands/L4.java b/src/main/java/frc/robot/commands/Elevateur/L4.java similarity index 98% rename from src/main/java/frc/robot/commands/L4.java rename to src/main/java/frc/robot/commands/Elevateur/L4.java index a2a46d0..58697c5 100644 --- a/src/main/java/frc/robot/commands/L4.java +++ b/src/main/java/frc/robot/commands/Elevateur/L4.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.Elevateur; import edu.wpi.first.networktables.DoubleSubscriber; import edu.wpi.first.networktables.NetworkTable; diff --git a/src/main/java/frc/robot/commands/DepartPince.java b/src/main/java/frc/robot/commands/Pince/DepartPince.java similarity index 97% rename from src/main/java/frc/robot/commands/DepartPince.java rename to src/main/java/frc/robot/commands/Pince/DepartPince.java index 12a69dd..bdfc343 100644 --- a/src/main/java/frc/robot/commands/DepartPince.java +++ b/src/main/java/frc/robot/commands/Pince/DepartPince.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.Pince; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.subsystems.Pince; diff --git a/src/main/java/frc/robot/commands/PinceManuel.java b/src/main/java/frc/robot/commands/Pince/PinceManuel.java similarity index 97% rename from src/main/java/frc/robot/commands/PinceManuel.java rename to src/main/java/frc/robot/commands/Pince/PinceManuel.java index 5b8b2c0..1382d39 100644 --- a/src/main/java/frc/robot/commands/PinceManuel.java +++ b/src/main/java/frc/robot/commands/Pince/PinceManuel.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.Pince; import java.util.function.DoubleSupplier; import edu.wpi.first.wpilibj2.command.Command; diff --git a/src/main/java/frc/robot/commands/PinceManuel2.java b/src/main/java/frc/robot/commands/PinceManuel2.java deleted file mode 100644 index bf8d1e4..0000000 --- a/src/main/java/frc/robot/commands/PinceManuel2.java +++ /dev/null @@ -1,47 +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.Command; -import frc.robot.subsystems.Pince; - -/* You should consider using the more terse Command factories API instead https://docs.wpilib.org/en/stable/docs/software/commandbased/organizing-command-based.html#defining-commands */ -public class PinceManuel2 extends Command { - private Pince pince; - //private DoubleSupplier doubleSupplier; - /** Creates a new PinceManuel. */ - public PinceManuel2(Pince pince - - //,DoubleSupplier doubleSupplier - ) { - this.pince = pince; - // this.doubleSupplier = doubleSupplier; - addRequirements(pince); - // 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() { - - pince.pivote(-0.2); - - } - - // Called once the command ends or is interrupted. - @Override - public void end(boolean interrupted) { - pince.pivote(0); - } - - // Returns true when the command should end. - @Override - public boolean isFinished() { - return false; - } -} diff --git a/src/main/java/frc/robot/commands/GrimperHaut.java b/src/main/java/frc/robot/commands/grimpeur/GrimperHaut.java similarity index 97% rename from src/main/java/frc/robot/commands/GrimperHaut.java rename to src/main/java/frc/robot/commands/grimpeur/GrimperHaut.java index ad0ebf0..ce3f65a 100644 --- a/src/main/java/frc/robot/commands/GrimperHaut.java +++ b/src/main/java/frc/robot/commands/grimpeur/GrimperHaut.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.grimpeur; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.subsystems.Bougie; diff --git a/src/main/java/frc/robot/commands/GrimpeurBas.java b/src/main/java/frc/robot/commands/grimpeur/GrimpeurBas.java similarity index 98% rename from src/main/java/frc/robot/commands/GrimpeurBas.java rename to src/main/java/frc/robot/commands/grimpeur/GrimpeurBas.java index 7837e24..4dfc3b0 100644 --- a/src/main/java/frc/robot/commands/GrimpeurBas.java +++ b/src/main/java/frc/robot/commands/grimpeur/GrimpeurBas.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.grimpeur; import edu.wpi.first.networktables.DoubleSubscriber; import edu.wpi.first.networktables.NetworkTable; diff --git a/src/main/java/frc/robot/commands/GrimpeurManuel.java b/src/main/java/frc/robot/commands/grimpeur/GrimpeurManuel.java similarity index 97% rename from src/main/java/frc/robot/commands/GrimpeurManuel.java rename to src/main/java/frc/robot/commands/grimpeur/GrimpeurManuel.java index 31a404b..60fdace 100644 --- a/src/main/java/frc/robot/commands/GrimpeurManuel.java +++ b/src/main/java/frc/robot/commands/grimpeur/GrimpeurManuel.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.grimpeur; import java.util.function.DoubleSupplier; diff --git a/src/main/java/frc/robot/commands/ResetGrimpeur.java b/src/main/java/frc/robot/commands/grimpeur/ResetGrimpeur.java similarity index 97% rename from src/main/java/frc/robot/commands/ResetGrimpeur.java rename to src/main/java/frc/robot/commands/grimpeur/ResetGrimpeur.java index b4e6978..5bf0bea 100644 --- a/src/main/java/frc/robot/commands/ResetGrimpeur.java +++ b/src/main/java/frc/robot/commands/grimpeur/ResetGrimpeur.java @@ -2,7 +2,7 @@ // 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; +package frc.robot.commands.grimpeur; import edu.wpi.first.wpilibj2.command.Command; import frc.robot.subsystems.Grimpeur;