From b5a40e219b8b621d50ea48a1cfbf1d62206a1061 Mon Sep 17 00:00:00 2001 From: samuel desharnais Date: Wed, 1 Nov 2023 18:12:14 -0400 Subject: [PATCH] drgf --- src/main/java/frc/robot/commands/Lancer.java | 2 +- src/main/java/frc/robot/subsystems/Lanceur.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/commands/Lancer.java b/src/main/java/frc/robot/commands/Lancer.java index 784b73d..efecd99 100644 --- a/src/main/java/frc/robot/commands/Lancer.java +++ b/src/main/java/frc/robot/commands/Lancer.java @@ -39,6 +39,6 @@ public class Lancer extends CommandBase { // Returns true when the command should end. @Override public boolean isFinished() { - return false; + return lanceur.distance()>1; } } diff --git a/src/main/java/frc/robot/subsystems/Lanceur.java b/src/main/java/frc/robot/subsystems/Lanceur.java index c611a4b..4c1bbfa 100644 --- a/src/main/java/frc/robot/subsystems/Lanceur.java +++ b/src/main/java/frc/robot/subsystems/Lanceur.java @@ -20,7 +20,7 @@ public class Lanceur extends SubsystemBase { } // encodeur - public double vitesse() { + public double distance() { return(lanceur.getEncoder().getPosition()); }