summaryrefslogtreecommitdiff
path: root/src/main/java/frc/robot/subsystems
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2024-02-24 14:05:20 +0200
committerkartofen <mladenovnasko0@gmail.com>2024-02-24 14:05:20 +0200
commitb929a1d34690d3d7fed6686459ff803962ce907f (patch)
tree1f6747fface1dc7e2dc0f19d762d37a54ba8edf0 /src/main/java/frc/robot/subsystems
parentc6d58f5fafb56f8ae295366eadbc247e0217acc8 (diff)
controlle change
Diffstat (limited to 'src/main/java/frc/robot/subsystems')
-rw-r--r--src/main/java/frc/robot/subsystems/Drivetrain.java13
1 files changed, 11 insertions, 2 deletions
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