Skip to content
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

Hailmary then chill #218

Merged
merged 9 commits into from
Mar 3, 2024
Merged

Hailmary then chill #218

merged 9 commits into from
Mar 3, 2024

Conversation

derp00monsta
Copy link
Contributor

added commands so that there will be a final shot if there is a piece in possession at a certain time stamp at the end of the match as well as creating coast modes for all subsystems, except for elevator and climb.

  • hunter & tina

@derp00monsta derp00monsta self-assigned this Mar 1, 2024
@GalexY727 GalexY727 requested review from GalexY727 and removed request for RudyG252 March 1, 2024 06:51
Copy link
Member

@GalexY727 GalexY727 left a comment

Choose a reason for hiding this comment

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

Make sure the timestamp that is being checked is referring to just the teleop duration and not the robot's full lifespan

src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
Comment on lines 194 to 195
new Trigger(() -> Robot.gameMode == Robot.GameMode.DISABLED)
.onTrue(setAllCoast());
Copy link
Member

Choose a reason for hiding this comment

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

This should be a .alongWith for line 192

@@ -182,6 +187,14 @@ private void configureButtonBindings() {
.onFalse(pathPlannerStorage.updatePathViewerCommand());
}

private void configureTimedEvents() {
new Trigger(() -> Robot.currentTimestamp >= 119.8 && intake.getPossession() && DriverStation.isFMSAttached())
Copy link
Member

Choose a reason for hiding this comment

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

Don't worry about our FMSAttached state here, if it isn't there then this serves as a subtle indicator that the match would have ended if we are doing driver practice. It might be useful to check if FMS is attached to set motors to coast mode, however.

Comment on lines 411 to 417
public Command setAllCoast() {
return Commands.sequence(
intake.setCoastMode(),
indexer.setCoastMode(),
trapper.setCoastMode()
);
}
Copy link
Member

Choose a reason for hiding this comment

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

move to pieceControl and rename to coastIntakeAndIndexer or something better if you can think of it.

@@ -170,6 +172,9 @@ public RobotContainer() {

configureButtonBindings();
configureLoggingPaths();
configureTimedEvents();
Copy link
Member

Choose a reason for hiding this comment

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

this should be on line 184 inside of configureButtonBindings. Feel free to move lines 185-187 into configureTimedEvents

Copy link
Member

@GalexY727 GalexY727 left a comment

Choose a reason for hiding this comment

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

the last edge case!

}

private void configureTimedEvents() {
new Trigger(() -> Robot.currentTimestamp - gamemodeStart >= 134.8)
Copy link
Member

Choose a reason for hiding this comment

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

this should also make sure we are not disabled on the chance the robot starts and sits for > 134.8 seconds before enabling for the first time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

iz good now?

Copy link
Member

@GalexY727 GalexY727 left a comment

Choose a reason for hiding this comment

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

👍👍

@GalexY727 GalexY727 merged commit f44a8d9 into main Mar 3, 2024
1 check passed
@GalexY727 GalexY727 deleted the hailmary-then-chill branch March 3, 2024 06:02
@derp00monsta
Copy link
Contributor Author

my 99th contribution >:D

@derp00monsta derp00monsta linked an issue Mar 3, 2024 that may be closed by this pull request
2 tasks
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.

At end of match (0.2s), run note to shoot and set intake motors to coast mode
2 participants