511 keep flywheel spun up#512
Open
Agit760 wants to merge 16 commits into
Open
Conversation
…ot is in our alliance zone
…pun-up' into 511-keep-flywheel-spun-up
Vilok1
requested changes
Apr 2, 2026
Contributor
There was a problem hiding this comment.
Any method that you are using in AllianceHelpers should be static and you shouldn't need to instantiate it. shootcommand does not repeatedly reevaluate the input. You should be using the runshootcommand. Also we would preferably spin up the flyweel a second before the active shift starts
…cond to each of the if clauses to start the shoot command 1 second before the hub is actually active.
Zane-122
reviewed
Apr 3, 2026
| new Trigger(copilot::getAButton).whileTrue(indexer.autoIndex(IndexerConstants.SPINDEXDER_POWER, IndexerConstants.TRANSFER_POWER)).onFalse(new InstantCommand(() -> indexer.stop())); | ||
|
|
||
| new Trigger(copilot::getYButton).whileTrue(indexer.indexCommand(-0.5).withTimeout(0.1).andThen(indexer.indexCommand(1))); | ||
| new Trigger(() -> AllianceHelpers.isHubAboutToBeActive()).and(() -> drivetrain.isInZone()).whileTrue(shooter.runShootCommand(() -> ShooterConstants.VELOCITY_MAP.get(cannon.getTargetDistance()))); |
Contributor
There was a problem hiding this comment.
shouldn't this be using .isHubActive() and not about to be active?
Zane-122
reviewed
Apr 3, 2026
| // Shift one is active for blue if red won auto, or red if blue won auto. | ||
| boolean shift1Active = isBlueAlliance() ? redInactiveFirst : !redInactiveFirst; | ||
|
|
||
| if (matchTime > 131) { |
Contributor
There was a problem hiding this comment.
isn't this all one second late instead of early
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created a trigger where if the robot is in the alliance zone and when there is 1 second left until the hub is active, then the shooter will run based on our interpolation maps.