Skip to content

Sfr autos#76

Merged
marisa07 merged 2 commits into
mainfrom
sfr-autos
Mar 22, 2025
Merged

Sfr autos#76
marisa07 merged 2 commits into
mainfrom
sfr-autos

Conversation

@TH3D0LPH1N

@TH3D0LPH1N TH3D0LPH1N commented Mar 22, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores

    • Updated build and version metadata.
  • New Features

    • Added a new command to quickly halt the related subsystem.
    • Introduced triggers for adjusting elevator positions.
    • Refined drive controls by scaling joystick inputs for smoother operation.
    • Reassigned the shooting command trigger to the left trigger for improved usability.

@coderabbitai

coderabbitai Bot commented Mar 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request updates build metadata and command behavior within the project. In the BuildConstants file, several static final fields storing build version information are revised. In the RobotContainer file, command registrations are modified to use Commands.runOnce() for setting subsystem goal states, a new command ("Stop CoralInAndOut") is introduced, new event triggers for elevator states are added, the joystick drive input is scaled down, and the TeleopShoot trigger is remapped. Some previous code sections remain as comments.

Changes

File(s) Change Summary
src/.../BuildConstants.java Updated static final fields: GIT_REVISION, GIT_SHA, GIT_DATE, GIT_BRANCH, BUILD_DATE, and BUILD_UNIX_TIME with new build version information.
src/.../RobotContainer.java Imported EventTrigger; modified command registrations for "Run Shooter" and "Run Intake" to use Commands.runOnce(); added new command "Stop CoralInAndOut"; introduced new event triggers for elevator states; scaled joystick drive inputs by 0.8; changed TeleopShoot trigger from y to leftTrigger; retained commented-out code sections.

Sequence Diagram(s)

sequenceDiagram
    participant Driver
    participant RobotContainer
    participant CoralInAndOut
    Driver->>RobotContainer: Activate "Run Shooter" / "Run Intake"
    RobotContainer->>CoralInAndOut: setGoalState(target state)
    Note over CoralInAndOut: Transition to new state
Loading
sequenceDiagram
    participant RobotContainer
    participant Elevator
    RobotContainer->>Elevator: "Elevator Height L4 Trigger" activated
    Elevator-->>RobotContainer: setGoalState(L4)
    RobotContainer->>Elevator: "Elevator Height Intake Trigger" activated
    Elevator-->>RobotContainer: setGoalState(INTAKE)
Loading

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • SoggieBoi
  • marisa07

Poem

I hop through lines of code so neat,
Updating constants with a rhythmic beat.
New commands spring to life with grace,
Event triggers set the pace.
A bunny’s smile in every commit—hopping through bits, bit by bit!
🐰💻


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96ad14c and 15a96fa.

⛔ Files ignored due to path filters (22)
  • build.gradle is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/1Coral_BlueBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/2Coral_BlueBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/2Coral_LeftBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/2Coral_Mid.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/2Coral_RedBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/2Coral_RightBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/3Coral_BlueBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/3Coral_Mid.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/Leave_LeftBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/Leave_Mid.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/autos/Leave_RightBarge.auto is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2CS to Reef BB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2CS to Reef RB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2Leave BB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2Leave Mid.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2Leave RB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2Reef to CS BB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/2Reef to CS RB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/Leave_BB.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/Leave_Mid.path is excluded by none and included by none
  • src/main/deploy/pathplanner/paths/Leave_RB.path is excluded by none and included by none
📒 Files selected for processing (2)
  • src/main/java/org/team5924/frc2025/BuildConstants.java (1 hunks)
  • src/main/java/org/team5924/frc2025/RobotContainer.java (5 hunks)
🔇 Additional comments (7)
src/main/java/org/team5924/frc2025/RobotContainer.java (6)

23-23: Import added for EventTrigger.

The import for EventTrigger from the PathPlanner library supports the new event triggers added later in the file.


132-140: Commands refactored to use runOnce() and added stop command.

The command registrations for "Run Shooter" and "Run Intake" have been refactored to use Commands.runOnce() instead of custom command classes. A new "Stop CoralInAndOut" command has been added to explicitly set the goal state to NO_CORAL.

This refactoring simplifies the code by using the Command framework's built-in functionality rather than separate command classes, providing a more consistent approach.


151-156: New event triggers added for elevator positions.

Added two new EventTrigger instances for "Elevator Height L4 Trigger" and "Elevator Height Intake Trigger" that will be available to PathPlanner auto routines. These allow the autonomous routines to control the elevator position during path execution.


213-215: Joystick drive input scaled down to 80%.

The joystick drive command inputs have been scaled down by multiplying by 0.8, reducing the robot's maximum speed during normal operation. This provides more precise control at the expense of some top speed.


251-262: Commented out coral station turning commands.

The commands for turning to left and right coral stations have been commented out. Ensure these features are intentionally disabled and won't be needed for the robot's operation.

Is the functionality for turning to coral stations no longer needed, or is it being replaced by another approach?


264-264: TeleopShoot trigger moved to left trigger.

The TeleopShoot command is now triggered by the left trigger instead of the previous button. This maintains consistency with the onFalse handler that already existed for the left trigger (lines 266-268).

src/main/java/org/team5924/frc2025/BuildConstants.java (1)

24-29: Updated build metadata.

Build constants have been updated to reflect the latest commit information and build timestamps. The branch has changed from "sfr-vision-fix" to "sfr-autos", matching the purpose of this PR.

These are automatically generated changes and don't require code review.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@marisa07 marisa07 merged commit e36617e into main Mar 22, 2025
This was referenced Apr 3, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Oct 18, 2025
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