rr2039 / RR-2020-InfiniteRecharge

Codebase for Infinite Recharge
2 stars 1 forks source link

Joystick Module #3

Closed graykevinb closed 4 years ago

graykevinb commented 4 years ago

Overview of Requirements A independent library for pulling controller data.

Requirements A new file called Controller.java The class by default will be called Controller.

Inside there will be two classes. One will be called “Axis” and the other “Button”

The Axis class will have a method called readAxis This method shall return the axis value.

The Button class will have a function named isPressed. This function will return true if the button is pressed, and false if it isn’t.

The parameters for a new instance shall be two integers. The first one will be for the controller id. The second will be for which button or axis is being used on the controller.

Overall the structure is as follows: ‘Controller.java Axis { Method readAxis{ return axis }

Button { Method isPressed { return button_state } } ‘

This code should be created in a branch called joystick. A pull request should be made to joystick-testing