From da8758c4a2f09790910477eb3ac3c27d54d59dd3 Mon Sep 17 00:00:00 2001 From: OlivierDubois Date: Wed, 18 Oct 2023 19:43:59 -0400 Subject: [PATCH] Encodeur Accumulateur subsysteme --- src/main/java/frc/robot/subsystems/Accumulateur.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/Accumulateur.java b/src/main/java/frc/robot/subsystems/Accumulateur.java index ead2c0b..3d790f4 100644 --- a/src/main/java/frc/robot/subsystems/Accumulateur.java +++ b/src/main/java/frc/robot/subsystems/Accumulateur.java @@ -18,7 +18,9 @@ public class Accumulateur extends SubsystemBase { public void Deaccumuler(double vitesse){ moteuracc.set(vitesse); } - + public double distance() { + return(moteuracc.getEncoder().getPosition()); + } @Override public void periodic() { // This method will be called once per scheduler run