diff --git a/src/main/java/frc/robot/commands/Avancer.java b/src/main/java/frc/robot/commands/Avancer.java index 00286c4..476601e 100644 --- a/src/main/java/frc/robot/commands/Avancer.java +++ b/src/main/java/frc/robot/commands/Avancer.java @@ -35,6 +35,6 @@ public class Avancer extends CommandBase { // Returns true when the command should end. @Override public boolean isFinished() { - return false; + return drive.distance()[0].distanceMeters>1; } } diff --git a/src/main/java/frc/robot/commands/Reculer.java b/src/main/java/frc/robot/commands/Reculer.java index 4c474b8..9d67460 100644 --- a/src/main/java/frc/robot/commands/Reculer.java +++ b/src/main/java/frc/robot/commands/Reculer.java @@ -33,6 +33,6 @@ public class Reculer extends CommandBase { // Returns true when the command should end. @Override public boolean isFinished() { - return false; + return drive.distance()[0].distanceMeters>1; } }