-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hailmary then chill #218
Conversation
… last 0.2 seconds before end of match
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.
Make sure the timestamp that is being checked is referring to just the teleop duration and not the robot's full lifespan
new Trigger(() -> Robot.gameMode == Robot.GameMode.DISABLED) | ||
.onTrue(setAllCoast()); |
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.
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()) |
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.
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.
public Command setAllCoast() { | ||
return Commands.sequence( | ||
intake.setCoastMode(), | ||
indexer.setCoastMode(), | ||
trapper.setCoastMode() | ||
); | ||
} |
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.
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(); |
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.
this should be on line 184 inside of configureButtonBindings. Feel free to move lines 185-187 into configureTimedEvents
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 last edge case!
} | ||
|
||
private void configureTimedEvents() { | ||
new Trigger(() -> Robot.currentTimestamp - gamemodeStart >= 134.8) |
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.
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.
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.
iz good now?
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.
👍👍
my 99th contribution >:D |
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.