Skip to content

Fix redundant and confusing constants - #60

Draft
FRCTeam3255-Shared-K1-10 wants to merge 11 commits into
mainfrom
Fix-redundant-and-confusing-constants
Draft

Fix redundant and confusing constants#60
FRCTeam3255-Shared-K1-10 wants to merge 11 commits into
mainfrom
Fix-redundant-and-confusing-constants

Conversation

@FRCTeam3255-Shared-K1-10

Copy link
Copy Markdown
Contributor

No description provided.

@FRCTeam3255-Shared-K1-10 FRCTeam3255-Shared-K1-10 linked an issue Jun 13, 2026 that may be closed by this pull request
Comment thread src/main/java/frc/robot/constants/ConstRotors.java Outdated
public static final AngularVelocity FLYWHEEL_SHOOTING_SPEED = Units.RPM.of(1000);
// public static final AngularVelocity INTAKE_ROLLER_SPEED = Units.RPM.of(2000);
public static final double SERIALIZER_SHOOTING_SPEED = 1;
public static final double SERIALIZER_ROLLERS_SPEED = 1;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this used for?

@TaylerUva

Copy link
Copy Markdown
Member

Merge conflicts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors shooter/hood “prep” and roller direction constants to reduce redundancy/confusion and updates command call sites to use the renamed constants.

Changes:

  • Rename flywheel and hood preset constants to use a *_PREP_* naming scheme and update all prep commands accordingly.
  • Rename/reshape several roller percent-output constants (serializer + reverse/eject) and update affected state commands.
  • Remove some commented-out / redundant constant definitions in the rotors constants file.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/main/java/frc/robot/constants/ConstRotors.java Renames flywheel preset constants and roller percent-output constants used by state commands.
src/main/java/frc/robot/constants/ConstMotion.java Renames hood preset angles to HOOD_PREP_* variants.
src/main/java/frc/robot/commands/states/Shooting.java Updates serializer rollers percent-output constant reference.
src/main/java/frc/robot/commands/states/ReversingShooter.java Updates reverse percent-output constant reference for shooter reversal.
src/main/java/frc/robot/commands/states/preps/PrepTrench.java Updates BasePrep call to new FLYWHEEL_PREP_* / HOOD_PREP_* constants.
src/main/java/frc/robot/commands/states/preps/PrepTower.java Updates BasePrep call to new FLYWHEEL_PREP_* / HOOD_PREP_* constants.
src/main/java/frc/robot/commands/states/preps/PrepOpponentToAlliance.java Updates BasePrep call to new FLYWHEEL_PREP_* / HOOD_PREP_* constants.
src/main/java/frc/robot/commands/states/preps/PrepNeutralToAlliance.java Updates BasePrep call to new FLYWHEEL_PREP_* / HOOD_PREP_* constants.
src/main/java/frc/robot/commands/states/preps/PrepHub.java Updates BasePrep call to new FLYWHEEL_PREP_* / HOOD_PREP_* constants.
src/main/java/frc/robot/commands/states/preps/PrepCorner.java Updates BasePrep call to new FLYWHEEL_PREP_* / HOOD_PREP_* constants.
src/main/java/frc/robot/commands/states/EjectingHopper.java Updates ejection roller constant references (but current mapping appears inconsistent with names).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/frc/robot/constants/ConstMotion.java Outdated
Comment thread src/main/java/frc/robot/commands/states/preps/PrepOpponentToAlliance.java Outdated
Comment on lines +30 to +32
RobotContainer.rotorsInstance.setIntakeRollersPercentOutput(ConstRotors.EJECTING_SERIALIZER_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setSerializerRollersPercentOutput(ConstRotors.REVERSE_TRANSFER_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_INTAKE_ROLLERS_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.EJECTING_INTAKE_ROLLERS_SPEED);
public void initialize() {
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_SHOOTING_SPEED);
RobotContainer.rotorsInstance.setFlywheelPercentOutput(ConstRotors.REVERSE_SHOOTING_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.REVERSE_SHOOTER_SPEED);
Comment on lines +31 to +32
RobotContainer.rotorsInstance.setSerializerRollersPercentOutput(ConstRotors.REVERSE_TRANSFER_ROLLERS_EAST_SPEED);
RobotContainer.rotorsInstance.setTransferRollersPercentOutput(ConstRotors.EJECTING_SERIALIZER_ROLLERS_SPEED);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These constants should be swapped

serializer function should get serializer const
transfer function should get transfer const

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.

Fix redundant and confusing constants

4 participants