-
Notifications
You must be signed in to change notification settings - Fork 2
/
OI.java
36 lines (29 loc) · 1007 Bytes
/
OI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package org.usfirst.frc.team6489.robot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.InternalButton;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
public class OI {
public static Joystick left;
public static JoystickButton leftControls;
public static Joystick right;
public static JoystickButton rightControls;
public static XboxController xbox;
// TODO: Test if these works as static!
public static Button forkliftUp;
public static Button forkliftDown;
/**
* Initializes all the buttons and their actions.
**/
public void initControls() {
xbox = new XboxController(0);
left = new Joystick(1);
right = new Joystick(2);
InternalButton none = new InternalButton(); // Effectively a button that is eternally not-pressed
leftControls = new JoystickButton(left, 11);
rightControls = new JoystickButton(right, 12);
}
public OI() {
initControls();
}
}