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

ControllerNode should be able to return the value of a button #26

Open
5 tasks
Dylan-Powers opened this issue Apr 24, 2022 · 0 comments
Open
5 tasks

ControllerNode should be able to return the value of a button #26

Dylan-Powers opened this issue Apr 24, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Dylan-Powers
Copy link
Member

Dylan-Powers commented Apr 24, 2022

Right now we use the following to get controller input: m_controller->getController()->get_digital(m_button1); where m_controller is a ControllerNode object and m_button1 is a button object. What that code does is get the pros::Controller object from our ControllerNode and then call a PROS method on it. We should create our own method to wrap the PROS functionality.

  • Create a public method in ControllerNode

  • This method should return the current value of that button

  • This method should have one parameter, a button object

  • Test and verify that the method works with all buttons

  • Change all current readings of controller values to use this method.

@Dylan-Powers Dylan-Powers added enhancement New feature or request good first issue Good for newcomers labels Apr 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 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant