Skip to content

511 keep flywheel spun up#512

Open
Agit760 wants to merge 16 commits into
mainfrom
511-keep-flywheel-spun-up
Open

511 keep flywheel spun up#512
Agit760 wants to merge 16 commits into
mainfrom
511-keep-flywheel-spun-up

Conversation

@Agit760

@Agit760 Agit760 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

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.

@Agit760 Agit760 linked an issue Apr 1, 2026 that may be closed by this pull request
@Agit760 Agit760 requested a review from a team April 1, 2026 23:35
zuesdajuice
zuesdajuice previously approved these changes Apr 1, 2026

@zuesdajuice zuesdajuice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

zuesdajuice
zuesdajuice previously approved these changes Apr 2, 2026

@zuesdajuice zuesdajuice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@Vilok1 Vilok1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.
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())));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't this be using .isHubActive() and not about to be active?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nevermind ignore this

// Shift one is active for blue if red won auto, or red if blue won auto.
boolean shift1Active = isBlueAlliance() ? redInactiveFirst : !redInactiveFirst;

if (matchTime > 131) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't this all one second late instead of early

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.

Keep Flywheel Spun Up

6 participants