From 21c256a8b4b9ee107afb314e93ffea9adf181a5e Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 4 Dec 2023 17:19:02 -0500 Subject: [PATCH 1/2] s --- src/main/java/frc/robot/commands/Lancer.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/commands/Lancer.java b/src/main/java/frc/robot/commands/Lancer.java index f52c69c..00685b9 100644 --- a/src/main/java/frc/robot/commands/Lancer.java +++ b/src/main/java/frc/robot/commands/Lancer.java @@ -13,9 +13,6 @@ import edu.wpi.first.wpilibj2.command.WaitUntilCommand; import frc.robot.subsystems.Accumulateur; import frc.robot.subsystems.Lanceur; -// NOTE: Consider using this command inline, rather than writing a subclass. For more -// information, see: -// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html public class Lancer extends ParallelCommandGroup { private Lanceur lanceur; private Accumulateur accumulateur; @@ -28,7 +25,7 @@ public class Lancer extends ParallelCommandGroup { // Add your commands in the addCommands() call, e.g. // addCommands(new FooCommand(), new BarCommand()); addCommands(new Lancez(lanceur), - new SequentialCommandGroup(new WaitUntilCommand(()->lanceur.vitesse()>vitesse.getDouble(0))) - ,new AccAvancer(accumulateur),new AccReculer(accumulateur)); + new SequentialCommandGroup(new WaitUntilCommand(()->lanceur.vitesse()>vitesse.getDouble(0))), + new AccAvancer(accumulateur),new AccReculer(accumulateur)); } } From 4be4a22fc8f5fbf6d15dab10ec6f305d5317e232 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Mon, 4 Dec 2023 17:37:39 -0500 Subject: [PATCH 2/2] gfgh --- src/main/java/frc/robot/RobotContainer.java | 11 ++++++----- src/main/java/frc/robot/commands/Lancer.java | 4 +--- src/main/java/frc/robot/commands/Lancez.java | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index e0d7d25..9b07d21 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -59,7 +59,7 @@ public class RobotContainer { private void configureBindings() { - accumulateurtest accumulateurtest = new accumulateurtest(accumulateur); + accumulateurtest accumulateurtest = new accumulateurtest(accumulateur); joystick1.button(7).onTrue(new Lancer(lanceur, accumulateur, force1)); joystick1.button(8).onTrue(new Lancer(lanceur, accumulateur, force2)); joystick1.button(9).onTrue(new Lancer(lanceur, accumulateur, force3)); @@ -70,11 +70,12 @@ public class RobotContainer { joystick1.button(5).toggleOnTrue(accumulateurtest); } + public Command getAutonomousCommand() { - return new SequentialCommandGroup(new Avancer(drive), new Force7(lanceur, force7, accumulateur) + return null; + /* new SequentialCommandGroup(new Avancer(drive), new Force7(lanceur, force7, accumulateur) , new Lancer(lanceur, accumulateur, force1), new Reculer(drive)); - } + */ } } - /* return new SequentialCommandGroup(new Avancer(drive), new Force7(lanceur, force7, accumulateur) - , new Force1(lanceur, accumulateur, force1), new Reculer(drive));*/ + diff --git a/src/main/java/frc/robot/commands/Lancer.java b/src/main/java/frc/robot/commands/Lancer.java index 00685b9..ebce965 100644 --- a/src/main/java/frc/robot/commands/Lancer.java +++ b/src/main/java/frc/robot/commands/Lancer.java @@ -4,8 +4,6 @@ package frc.robot.commands; -import java.util.function.DoubleSupplier; - import edu.wpi.first.networktables.GenericEntry; import edu.wpi.first.wpilibj2.command.ParallelCommandGroup; import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; @@ -17,7 +15,7 @@ public class Lancer extends ParallelCommandGroup { private Lanceur lanceur; private Accumulateur accumulateur; - /** Creates a new Force1. */ + public Lancer(Lanceur lanceur,Accumulateur accumulateur,GenericEntry vitesse) { this.lanceur = lanceur; this.accumulateur = accumulateur; diff --git a/src/main/java/frc/robot/commands/Lancez.java b/src/main/java/frc/robot/commands/Lancez.java index 029a806..23ce090 100644 --- a/src/main/java/frc/robot/commands/Lancez.java +++ b/src/main/java/frc/robot/commands/Lancez.java @@ -5,7 +5,6 @@ package frc.robot.commands; import edu.wpi.first.wpilibj2.command.CommandBase; -import frc.robot.subsystems.Accumulateur; import frc.robot.subsystems.Lanceur; public class Lancez extends CommandBase {