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

Add Other Buttons #21

Open
danielbrownmsm opened this issue Dec 24, 2022 · 0 comments
Open

Add Other Buttons #21

danielbrownmsm opened this issue Dec 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@danielbrownmsm
Copy link
Collaborator

Add Other Buttons

Summary
We should go ahead and add the other gamepad buttons to RobotContainer. The a, b, and back buttons on gamepad1 are already added over at RobotContainer.h:

    /**
     * User interfaces
     * - Gamepads
     * - Joystick Buttons
     */
    std::shared_ptr<frc::Joystick> gamepad1_;
    std::shared_ptr<frc::Joystick> gamepad2_;

    std::shared_ptr<frc2::JoystickButton> driver_a_button_;
    std::shared_ptr<frc2::JoystickButton> driver_b_button_;
    std::shared_ptr<frc2::JoystickButton> driver_back_button_;

And at RobotContainer.cpp:

    gamepad1_ = std::make_shared<frc::Joystick>(gamepad1_id);
    gamepad2_ = std::make_shared<frc::Joystick>(gamepad2_id);

    // Initialize the joystick buttons
    driver_a_button_ =
        std::make_shared<frc2::JoystickButton>(gamepad1_.get(), A_BUTTON);

Work Required

  • add remaining gamepad buttons to RobotContainer

Verification

  • CI passes
  • code is documented
@danielbrownmsm danielbrownmsm added this to the Previous Functionality milestone Dec 24, 2022
@danielbrownmsm danielbrownmsm added the enhancement New feature or request label Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant