Changed From Expansion to Control Hub for Foresight - #93
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the ForesightTuner tuning OpModes to reference a REV Control Hub by name when retrieving the VoltageSensor, reflecting a shift from an Expansion Hub–based configuration.
Changes:
- Replaced
"Expansion Hub 1"with"Control Hub"forVoltageSensorhardwareMap lookups in three tuner routines.
Suppressed comments (2)
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/procedures/ForesightTuner.java:708
- This VoltageSensor lookup is still tied to the specific configuration name "Control Hub". To keep this OpMode runnable across common configurations (and consistent with other code here), prefer selecting the available VoltageSensor from
hardwareMap.getAll(...)instead of name-based lookup.
voltageSensor = hardwareMap.get(VoltageSensor.class, "Control Hub");
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pedroPathing/procedures/ForesightTuner.java:870
- Hard-coding the hub name ("Control Hub") for VoltageSensor retrieval can break when teams rename hubs in the RC configuration. Prefer
hardwareMap.getAll(VoltageSensor.class).iterator().next()to make the tuner configuration-name agnostic.
voltageSensor = hardwareMap.get(VoltageSensor.class, "Control Hub");
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| POWERS = biasedGradient(trials, maxPower, minPower, bias); | ||
| voltageSensor = hardwareMap.get(VoltageSensor.class, "Expansion Hub 1"); | ||
| voltageSensor = hardwareMap.get(VoltageSensor.class, "Control Hub"); |
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.
Before issuing a pull request, please see the contributing page.