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

Faster babybomber #21

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Faster babybomber #21

wants to merge 5 commits into from

Conversation

finnsherman
Copy link
Contributor

I wanted something to do and remembered a comment Osowski made at IRI about how baby bomber would be faster if it didn't reset the turret's position every time so I went ahead and did that. I'm pretty sure it will work but it will obviously need to be tested sometime during preseason. I really do not need to be there for the testing so if anyone gets the chance feel free to test it and leave a comment or merge the branch if it works, and request any changes or report any malfunctions if it does not do what it's supposed to.

@agasser
Copy link
Collaborator

agasser commented Aug 15, 2024

I don't think you need to copy the commands into a single command. You probably just need to remove/override the end() method on BabyBirdCommand, I think stopping the motors is what's making the turret fall.

The simplest, but a little hacky, way to do it is with an anonymous inner class:

  public Command babyBirdNoDrop() {
    return new BabyBirdCommand(
        turretSubsystem, shooterSubsystem) {
          public void end(boolean interrupted) {
            // Don't turn the motors off
          };
        }.deadlineWith(new LEDBlinkCommand(ledSubsystem, BABYBIRD_COLOR, 0.1));
  }

Copy link
Collaborator

@agasser agasser left a comment

Choose a reason for hiding this comment

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

I think this looks right (except the indenting). Let's give it a try when we can get on the robot!

Comment on lines 193 to 195
autoCommands.babyBirdNoDrop()
.andThen(autoCommands.shootMid(controlBindings.translationX(), controlBindings.translationY()))
.repeatedly()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

These lines are not indented correctly

Copy link
Collaborator

@agasser agasser left a comment

Choose a reason for hiding this comment

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

Looks great. We need to test before approving and merging.

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.

2 participants