Skip to content

Feature/stow update#59

Open
davidpolcen-sudo wants to merge 7 commits intodevfrom
feature/stow_update
Open

Feature/stow update#59
davidpolcen-sudo wants to merge 7 commits intodevfrom
feature/stow_update

Conversation

@davidpolcen-sudo
Copy link
Copy Markdown
Collaborator

No description provided.

@davidpolcen-sudo davidpolcen-sudo added the Untested This codes has not been tested, apart from a build. label Apr 9, 2026
@davidpolcen-sudo davidpolcen-sudo requested review from CameronMyhre, CrumblzTheEgg and quipp and removed request for CrumblzTheEgg April 9, 2026 23:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates turret “stow” behavior and shooting bindings so the turret aims only while shooting and the transfer feed is delayed to let the shooter spin up first.

Changes:

  • Reworked TurretSubsystem.getStowCommand() to use a velocity-stability settle routine (and added hood velocity accessor).
  • Updated RobotContainer bindings so holding the shoot trigger runs turret targeting and delays transfer loading.
  • Added new constants for hood settling and transfer load delay.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/main/java/frc/robot/subsystems/TurretSubsystem.java Adds hood velocity helper and rewrites stow command to settle based on encoder velocity.
src/main/java/frc/robot/RobotContainer.java Binds shoot trigger to turret targeting and adds a delay before transfer load; sets turret default to stow.
src/main/java/frc/robot/Constants.java Introduces constants used by the new stow/settle logic and transfer load delay.

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

Comment on lines +283 to +310
Command settleDown = Commands.run(
() -> pitchServo.setSpeed((Constants.Turret.PITCH_INVERTED ? -1.0 : 1.0) * -Constants.Turret.STOW_PUSH_DOWN_SPEED),
this)
// stop when encoder velocity magnitude <= threshold
.until(() -> {
boolean within = Math.abs(getHoodVelocity()) <= stopThreshold;

if (within) {
if (!settleTimer.isRunning()) {
settleTimer.reset();
settleTimer.start();
}
//Finish when considered stable
return settleTimer.hasElapsed(maxSettleTime);
} else {
settleTimer.stop();
settleTimer.reset();
return false;
}
}
)
// ensure the servo is stopped when this command completes
.andThen(() -> {
pitchServo.setSpeed(0.0);
settleTimer.stop();
settleTimer.reset();
}
);
quipp and others added 4 commits April 9, 2026 19:47
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Untested This codes has not been tested, apart from a build.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants