Skip to content

Changed From Expansion to Control Hub for Foresight - #93

Merged
BaronClaps merged 1 commit into
Pedro-Pathing:pedro3from
Mithilessh2010:pedro3
Sep 1, 2026
Merged

Changed From Expansion to Control Hub for Foresight#93
BaronClaps merged 1 commit into
Pedro-Pathing:pedro3from
Mithilessh2010:pedro3

Conversation

@Mithilessh2010

Copy link
Copy Markdown

Before issuing a pull request, please see the contributing page.

Copilot AI lite review requested due to automatic review settings September 1, 2026 05:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" for VoltageSensor hardwareMap 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");
@BaronClaps
BaronClaps merged commit 2a0d818 into Pedro-Pathing:pedro3 Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants