From 8429d767295472a80d373ecd8a4f8d9f273e4f77 Mon Sep 17 00:00:00 2001 From: chase Date: Wed, 14 Oct 2026 20:59:49 -0700 Subject: [PATCH] Use the Distance input in the Line, Curve and Interpolation tests Each test receives the Distance from the Tests procedure and stores it in this.distance, but runTuningOpMode() then declares a local 'double distance = 48;' that shadows the field. Every test drives 48 in no matter what Distance is entered. Remove the shadowing locals so the entered Distance is used. --- .../org/firstinspires/ftc/teamcode/pedro/procedures/Tests.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedro/procedures/Tests.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedro/procedures/Tests.java index a5470a7add14..7501011a8ecf 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedro/procedures/Tests.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedro/procedures/Tests.java @@ -168,7 +168,6 @@ public Boolean runTuningOpMode() throws InterruptedException { Follower follower = followerFunction.apply(hardwareMap); follower.setPose(Pose.zero()); - double distance = 48; boolean forward = true; Path path1 = line(Pose.zero(), new Pose(distance,0, 0)).constant(0); @@ -210,7 +209,6 @@ public Boolean runTuningOpMode() throws InterruptedException { Follower follower = followerFunction.apply(hardwareMap); follower.setPose(Pose.zero()); - double distance = 48; boolean forward = true; Path path1 = curve(Pose.zero(), new Pose(distance + 0,0), new Pose(distance,distance)).tangent(); @@ -252,7 +250,6 @@ public Boolean runTuningOpMode() throws InterruptedException { Follower follower = followerFunction.apply(hardwareMap); follower.setPose(Pose.zero()); - double distance = 48; boolean forward = true; Path path1 = curve(Pose.zero(), new Pose(distance + 0,0), new Pose(distance,distance)).heading((curve, t) -> Math.PI);