From b929a1d34690d3d7fed6686459ff803962ce907f Mon Sep 17 00:00:00 2001 From: kartofen Date: Sat, 24 Feb 2024 14:05:20 +0200 Subject: controlle change --- src/main/java/frc/robot/subsystems/Drivetrain.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/main/java/frc/robot/subsystems/Drivetrain.java') diff --git a/src/main/java/frc/robot/subsystems/Drivetrain.java b/src/main/java/frc/robot/subsystems/Drivetrain.java index c149477..557c7e3 100644 --- a/src/main/java/frc/robot/subsystems/Drivetrain.java +++ b/src/main/java/frc/robot/subsystems/Drivetrain.java @@ -175,11 +175,20 @@ public class Drivetrain extends SubsystemBase public Command sysIdQausistatic(SysIdRoutine.Direction direction) { - return m_sysIdRoutine.quasistatic(direction); + return Commands.race(m_sysIdRoutine.quasistatic(direction), + Commands.runOnce(() -> { + while(m_encoderL.getDistance() < 6 && + m_encoderR.getDistance() < 6); + })); + } public Command sysIdDynamic(SysIdRoutine.Direction direction) { - return m_sysIdRoutine.dynamic(direction); + return Commands.race(m_sysIdRoutine.dynamic(direction), + Commands.runOnce(() -> { + while(m_encoderL.getDistance() < 6 && + m_encoderR.getDistance() < 6); + })); } } \ No newline at end of file -- cgit v1.2.3