diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java index ee3b388a1f08..d9b93a058dfe 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java @@ -223,7 +223,7 @@ public FollowTrajectoryAction(TimeTrajectory t) { List disps = com.acmerobotics.roadrunner.Math.range( 0, t.path.length(), - (int) Math.ceil(t.path.length() / 2)); + Math.max(2, (int) Math.ceil(t.path.length() / 2))); xPoints = new double[disps.size()]; yPoints = new double[disps.size()]; for (int i = 0; i < disps.size(); i++) { diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/TankDrive.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/TankDrive.java index f281d993eaba..970c48417eef 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/TankDrive.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/TankDrive.java @@ -231,7 +231,7 @@ public FollowTrajectoryAction(TimeTrajectory t) { List disps = com.acmerobotics.roadrunner.Math.range( 0, t.path.length(), - (int) Math.ceil(t.path.length() / 2)); + Math.max(2, (int) Math.ceil(t.path.length() / 2))); xPoints = new double[disps.size()]; yPoints = new double[disps.size()]; for (int i = 0; i < disps.size(); i++) {