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

teleopPeriodic needs content #1

Open
virtuald opened this issue Feb 19, 2017 · 2 comments
Open

teleopPeriodic needs content #1

virtuald opened this issue Feb 19, 2017 · 2 comments

Comments

@virtuald
Copy link
Contributor

You should add decisions to teleopPeriodic that call the input functions based on joystick actions. For example:

if (m_joystick.getRawButton(5)) {
    m_component.do_something();
}

You will find the WPILib documentation very useful: http://first.wpi.edu/FRC/roborio/release/docs/java/

@HKenfack
Copy link
Contributor

I am a bit confused on the concept of how you would call the input functions based on joystick actions.

@virtuald
Copy link
Contributor Author

Which part is confusing? Do you understand how the example cited above works? In the case above, m_component is your component and do_something() is the input function. The idea is that when the joystick button is pressed, then you call an input function to tell it to do something.

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

No branches or pull requests

2 participants