Repository navigation
Tests ignore the Distance input and always drive 48 in - #120
Merged
BaronClaps merged 1 commit intoOct 15, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In
Tests.java, the Line, Curve and Interpolation tests always drive 48 in, whatever Distance is entered on the tuning page.Each test gets the Distance through its constructor and stores it in
this.distance, butrunTuningOpMode()then declares a local that shadows it:Fix
Remove the three shadowing locals so the paths use the entered Distance. The
48.0default on the input is unchanged, so nothing changes for anyone who leaves the field alone.Testing
On a mecanum robot with a Pinpoint (revhub 3.0.1, tuning 1.0.1): with Distance = 12, the Line test now drives 12 in and returns; before this change it drove 48 in. Curve and Interpolation build their paths from the same field.