fixed the stow so that it works with the new dev#63
fixed the stow so that it works with the new dev#63davidpolcen-sudo wants to merge 3 commits intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates turret hood stowing to better “seat” at the mechanical stow position and aligns teleop behavior so the turret stows by default and only targets while actively shooting.
Changes:
- Adjusted hood stow behavior to settle based on measured hood velocity (and reset hood encoder at stow).
- Updated
RobotContainerbindings so turret targeting runs while the shoot trigger is held; turret default command is now stow. - Added new constants for hood settle thresholds/timing and a transfer load delay.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/main/java/frc/robot/subsystems/TurretSubsystem.java |
Adds hood velocity accessor and changes stow sequence to settle until hood motion is stable, then resets hood angle at stow. |
src/main/java/frc/robot/RobotContainer.java |
Runs turret targeting only while shooting; sets turret default to stow; adds a small delay before starting transfer load on shoot. |
src/main/java/frc/robot/Constants.java |
Introduces new turret stow stability/velocity constants and a transfer LOAD_DELAY. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public static final double HOOD_STABLE = 5; | ||
|
|
||
| public static final double HOOD_STABLE_TIME = 0.1; | ||
|
|
There was a problem hiding this comment.
HOOD_STABLE_TIME is introduced but is unused anywhere, while HOOD_STABLE (value 5) is the constant actually used as the Timer elapsed threshold. Either remove the unused constant or use a single clearly-named constant (with units in the name/comment) for the stow stability time to avoid confusion/misconfiguration.
| public static final double HOOD_STABLE = 5; | |
| public static final double HOOD_STABLE_TIME = 0.1; | |
| public static final double HOOD_STABLE = 5; // seconds |
| targetingSupplier, | ||
| driveSubsystem::getPose, | ||
| driveSubsystem::getVelocity)); | ||
| turretSubsystem.setDefaultCommand(turretSubsystem.getStowCommand()); |
There was a problem hiding this comment.
TurretSubsystem's getStowCommand() sets SmartDashboard key Turret/IsStowing to true on initialize and never clears it. With the turret default command now set to getStowCommand(), this flag will likely stay true for the entire teleop session, which makes the indicator misleading. Consider changing the default to a non-stow idle/hold command, or update getStowCommand() to set the flag false when the stow sequence completes/ends.
| turretSubsystem.setDefaultCommand(turretSubsystem.getStowCommand()); | |
| turretSubsystem.setDefaultCommand(new RunCommand(() -> { | |
| }, turretSubsystem)); |
No description provided.