Skip to content

Commit 88c899e

Browse files
committed
remove automated teleop drive to path with demo
1 parent 465aa7f commit 88c899e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/frc/robot/RobotContainer.java

-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ public void configureSubsystems() {
221221
drivetrain.registerTelemetry(driveTelemetry::telemeterize);
222222
drivetrain.setPoseSupplier(driveTelemetry::getFieldToRobot);
223223
drivetrain.setVelocitySupplier(driveTelemetry::getVelocity);
224-
drivetrain
225224
}
226225

227226
if (FeatureFlags.runScoring) {

src/main/java/frc/robot/subsystems/drive/CommandSwerveDrivetrain.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import com.pathplanner.lib.util.HolonomicPathFollowerConfig;
1919
import com.pathplanner.lib.util.PIDConstants;
2020
import com.pathplanner.lib.util.ReplanningConfig;
21-
2221
import edu.wpi.first.math.MathUtil;
2322
import edu.wpi.first.math.controller.PIDController;
2423
import edu.wpi.first.math.geometry.Pose2d;
@@ -557,12 +556,14 @@ public boolean atPathfindPose() {
557556
}
558557

559558
public void driveToPose(Pose2d targetPose) {
560-
pathfindCommand = getPathfindCommand(targetPose);
561-
pathfindCommand.schedule();
559+
if (!demo) {
560+
pathfindCommand = getPathfindCommand(targetPose);
561+
pathfindCommand.schedule();
562+
}
562563
}
563564

564565
public void driveToPath(String pathName) {
565-
if (pathName == lastCommandedPath) {
566+
if (pathName == lastCommandedPath || demo) {
566567
return;
567568
} else {
568569
lastCommandedPath = pathName;

0 commit comments

Comments
 (0)