Skip to content

Algae corraler#27

Merged
Tortuga-AM merged 7 commits intomainfrom
AlgaeCorraler
May 29, 2025
Merged

Algae corraler#27
Tortuga-AM merged 7 commits intomainfrom
AlgaeCorraler

Conversation

@James4356
Copy link
Contributor

No description provided.

@Tortuga-AM Tortuga-AM requested review from Tortuga-AM and Copilot May 29, 2025 18:37
Copy link
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

This PR, titled "Algae corraler", refactors the subsystem’s state management by replacing the pivot setpoint control with a new arm speed control mechanism.

  • Updated the States enum to use two speed values (thereSpeed and notThereSpeed) instead of an Angle pivot setpoint.
  • Modified the simulation, real I/O, and interface to remove pivot-specific code and introduce arm speed methods.
  • Updated the main control logic in AlgaeCoraler.java to use the new arm speed values.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoralerStates.java Refactored enum to replace pivot setpoint with two speed parameters.
src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoralerIOSim.java Removed PID control and shifted focus from pivot setpoint to arm speed.
src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoralerIOReal.java Removed pivot control logic and updated nearTarget check with constant.
src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoralerIO.java Updated I/O interface to remove pivot methods and add arm speed methods.
src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoralerConstants.java Updated constants for arm speeds and removed obsolete angle definitions.
src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoraler.java Updated runState logic to use arm speed values instead of pivot setpoint.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Tortuga-AM Tortuga-AM requested a review from Copilot May 29, 2025 18:39
Copy link
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

This PR refactors the AlgaeCoraler subsystem to replace angle/PID-based pivot control with discrete "there" vs. "not there" arm speeds, updating states, constants, IO interfaces, and both simulation and real hardware implementations.

  • Split each state’s pivot control into two speeds (there/not there) in AlgaeCoralerStates and AlgaeCoralerConstants.
  • Removed Angle-based setpoint methods; introduced setArmSpeed in IO and implementations.
  • Updated IO inputs to drop pivot position/setpoint and added arm speed fields/mechanics.

Reviewed Changes

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

Show a summary per file
File Description
AlgaeCoralerStates.java Replaced single pivot setpoint with dual there/notThere speeds
AlgaeCoralerIOSim.java Removed PID pivot logic; added setArmSpeed and simulation speed
AlgaeCoralerIOReal.java Removed angle/PID logic; added arm-speed control and constants
AlgaeCoralerIO.java Replaced pivot methods and inputs with arm-speed methods/fields
AlgaeCoralerConstants.java Added there/not-there speed constants, debounce time, current threshold
AlgaeCoraler.java Changed runState to drive pivot via setArmSpeed
Comments suppressed due to low confidence (1)

src/main/java/frc/robot/Subsystems/AlgaeCoraler/AlgaeCoralerIO.java:9

  • Field names should be lowerCamelCase. Rename ArmSpeed to armSpeed (and similarly ArmSetpoint to armSetpoint) for consistency with Java conventions.
public double ArmSpeed;

Copy link
Contributor

@Tortuga-AM Tortuga-AM left a comment

Choose a reason for hiding this comment

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

Lgtm. I'll test it in sim in a bit.

@Tortuga-AM Tortuga-AM requested a review from GreenTomato5 May 29, 2025 18:50
Copy link
Contributor

@PotmanNob PotmanNob left a comment

Choose a reason for hiding this comment

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

goofy ahh variable names

@Tortuga-AM Tortuga-AM requested a review from PotmanNob May 29, 2025 19:21
Copy link
Contributor

@PotmanNob PotmanNob left a comment

Choose a reason for hiding this comment

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

lgtm

@Tortuga-AM Tortuga-AM merged commit f2f2938 into main May 29, 2025
3 checks passed
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.

5 participants