-
Notifications
You must be signed in to change notification settings - Fork 9
Girls gen updates #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Girls gen updates #189
Conversation
markpete
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if we can get rid of the redundant code and make this more maintainable.
koolpoolo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigma
| blueBranchI, | ||
| blueBranchJ, | ||
| blueBranchK, | ||
| blueBranchL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List.of returns an immutable object, so each of these lists could just be assigned to a static final class variable and then used instead of calling List.of() and recreating these fixed lists all the time. Not blocking - just an area for improvement.
| spinnyClaw.stop()) | ||
| .withTimeout(0.5), | ||
| repeatPrescoreScoreSwing( | ||
| Commands.repeatingSequence( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems odd to have a repeating sequence passed in to a function that repeats the passed in command. Is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, this is identical to coralLevelTwo() but with different constants for a few things. If they should match other than constants, it'd be useful to rework this post-comp to remove the duplicated code (via a template function or some other method)
| .until(ipScore) | ||
| .until(score)), | ||
| spinnyClaw.stop()) | ||
| .withTimeout(0.5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .withTimeout() values (e.g., 0.5, 1.5) are hardcoded. Consider defining these as constants or configurable parameters to make the code easier to maintain and tune.
| armPivot | ||
| .moveToPosition(ArmPivot.CORAL_PRESET_DOWN) | ||
| .withTimeout(1.5) | ||
| .until(armPivot.atAngle(ArmPivot.CORAL_POST_SCORE))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no explicit error handling in case the subsystems fail to reach their target positions. Consider adding fallback logic or logging to handle such cases. Once physical simulation of the subsystems are implemented, tweaking parameters there (to make them move slower or faster) would allow testing of the error handling here.
This comment was marked as resolved.
This comment was marked as resolved.
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a significant refactoring of the auto-alignment and scoring logic, notably by adding AllianceUtils, ScoringType, and AlignType to improve code structure and reduce duplication. The Shuffleboard layout in elastic-layout.json has also been completely reorganized. My review focuses on improving performance by avoiding repeated object creation in AutoAlign, enhancing maintainability by removing magic numbers, and fixing a potential regression in the controller rumble feedback for scoring alignment. I also suggest a small improvement to the new AllianceUtils class to follow best practices.
No description provided.