From 0e444784fcf766fcdecce7437e5e563d59898ce0 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Sat, 2 Dec 2023 09:30:18 -0500 Subject: [PATCH 1/5] rdytfhgj --- src/main/java/frc/robot/commands/Force1.java | 14 +++++--- vendordeps/PathplannerLib2023.json | 36 ++++++++++++++++++++ 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 vendordeps/PathplannerLib2023.json diff --git a/src/main/java/frc/robot/commands/Force1.java b/src/main/java/frc/robot/commands/Force1.java index 8d4e567..eb3604a 100644 --- a/src/main/java/frc/robot/commands/Force1.java +++ b/src/main/java/frc/robot/commands/Force1.java @@ -37,11 +37,15 @@ public class Force1 extends CommandBase { double vitesse = (100); if (lanceur.vitesse() > vitesse ){ accumulateur.tourneavant(); - accumulateur.tournearriere(); - } else { - accumulateur.stop(); + if(accumulateur.tourneavant()>1024) { + accumulateur.tournearriere(); } - } + if(accumulateur.tournearriere()>-256){ + accumulateur.stop(); + } + }} + + // Called once the command ends or is interrupted. @@ -53,6 +57,6 @@ public class Force1 extends CommandBase { // Returns true when the command should end. @Override public boolean isFinished() { - return false; + return accumulateur.tournearriere()>-256; } } diff --git a/vendordeps/PathplannerLib2023.json b/vendordeps/PathplannerLib2023.json new file mode 100644 index 0000000..51cdc33 --- /dev/null +++ b/vendordeps/PathplannerLib2023.json @@ -0,0 +1,36 @@ +{ + "fileName": "PathplannerLib2023.json", + "name": "PathplannerLib", + "version": "2023.4.4", + "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", + "frcYear": "2023", + "mavenUrls": [ + "https://3015rangerrobotics.github.io/pathplannerlib/repo" + ], + "jsonUrl": "https://3015rangerrobotics.github.io/pathplannerlib/PathplannerLib2023.json", + "javaDependencies": [ + { + "groupId": "com.pathplanner.lib", + "artifactId": "PathplannerLib-java", + "version": "2023.4.4" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "com.pathplanner.lib", + "artifactId": "PathplannerLib-cpp", + "version": "2023.4.4", + "libName": "PathplannerLib", + "headerClassifier": "headers", + "sharedLibrary": false, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "windowsx86-64", + "linuxx86-64", + "osxuniversal", + "linuxathena" + ] + } + ] +} \ No newline at end of file From 61a0cb96104a2a0b874cdac5ac28fc22212f8ac3 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Sat, 2 Dec 2023 09:39:38 -0500 Subject: [PATCH 2/5] gfgn --- src/main/java/frc/robot/commands/Force1.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/commands/Force1.java b/src/main/java/frc/robot/commands/Force1.java index eb3604a..7b3cb09 100644 --- a/src/main/java/frc/robot/commands/Force1.java +++ b/src/main/java/frc/robot/commands/Force1.java @@ -52,11 +52,12 @@ public class Force1 extends CommandBase { @Override public void end(boolean interrupted) { lanceur.lancer(0); + accumulateur.stop(); } // Returns true when the command should end. @Override public boolean isFinished() { - return accumulateur.tournearriere()>-256; + return false; } } From be7fcc79613c88f590e1d5a3c11f70339ab311e9 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Sat, 2 Dec 2023 09:48:05 -0500 Subject: [PATCH 3/5] nb --- src/main/java/frc/robot/RobotContainer.java | 4 +- .../frc/robot/commands/accumulateurtest.java | 38 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/main/java/frc/robot/commands/accumulateurtest.java diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 0ee7bdb..1ea9ed1 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -23,6 +23,7 @@ import frc.robot.commands.Force5; import frc.robot.commands.Force6; import frc.robot.commands.Force7; import frc.robot.commands.Reculer; +import frc.robot.commands.accumulateurtest; import frc.robot.subsystems.Accumulateur; import frc.robot.subsystems.Drive; import frc.robot.subsystems.Lanceur; @@ -64,6 +65,7 @@ public class RobotContainer { Force5 Force5 = new Force5(lanceur, null, accumulateur); Force6 Force6 = new Force6(lanceur, null, accumulateur); Force7 Force7 = new Force7(lanceur, null, accumulateur); + accumulateurtest accumulateurtest = new accumulateurtest(accumulateur); joystick1.button(7).onTrue(Force1); joystick1.button(8).onTrue(Force2); joystick1.button(9).onTrue(Force3); @@ -71,7 +73,7 @@ public class RobotContainer { joystick1.button(11).onTrue(Force5); joystick1.button(12).onTrue(Force6); joystick1.button(3).onTrue(Force7); - + joystick1.button(5).toggleOnTrue(accumulateurtest); } diff --git a/src/main/java/frc/robot/commands/accumulateurtest.java b/src/main/java/frc/robot/commands/accumulateurtest.java new file mode 100644 index 0000000..d72de01 --- /dev/null +++ b/src/main/java/frc/robot/commands/accumulateurtest.java @@ -0,0 +1,38 @@ +// 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.Accumulateur; + +public class accumulateurtest extends CommandBase { + private Accumulateur accumulateur; + /** Creates a new accumulateurtest. */ + public accumulateurtest(Accumulateur accumulateur) { + this.accumulateur = accumulateur; + addRequirements(accumulateur); + // 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() { + accumulateur.reaccumuler(); + } + + // 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 4bbead03b231c7918599791a72ec5d29823d8add Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Sat, 2 Dec 2023 09:49:45 -0500 Subject: [PATCH 4/5] wsad --- src/main/java/frc/robot/commands/accumulateurtest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/commands/accumulateurtest.java b/src/main/java/frc/robot/commands/accumulateurtest.java index d72de01..3701643 100644 --- a/src/main/java/frc/robot/commands/accumulateurtest.java +++ b/src/main/java/frc/robot/commands/accumulateurtest.java @@ -28,7 +28,9 @@ public class accumulateurtest extends CommandBase { // Called once the command ends or is interrupted. @Override - public void end(boolean interrupted) {} + public void end(boolean interrupted) { + accumulateur.stop(); + } // Returns true when the command should end. @Override From 341581e04618bd66f0ca0f175cc84b9b6f67425b Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Sat, 2 Dec 2023 10:13:09 -0500 Subject: [PATCH 5/5] changement --- src/main/java/frc/robot/commands/Force1.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/frc/robot/commands/Force1.java b/src/main/java/frc/robot/commands/Force1.java index 7b3cb09..78ccfd6 100644 --- a/src/main/java/frc/robot/commands/Force1.java +++ b/src/main/java/frc/robot/commands/Force1.java @@ -37,8 +37,10 @@ public class Force1 extends CommandBase { double vitesse = (100); if (lanceur.vitesse() > vitesse ){ accumulateur.tourneavant(); + accumulateur.Deaccumuler(); if(accumulateur.tourneavant()>1024) { accumulateur.tournearriere(); + accumulateur.reaccumuler(); } if(accumulateur.tournearriere()>-256){ accumulateur.stop();