-
Notifications
You must be signed in to change notification settings - Fork 2
/
IO.java
68 lines (52 loc) · 2.26 KB
/
IO.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package org.usfirst.frc.team6400.robot;
import org.usfirst.frc.team6400.robot.commands.BallPickupForward;
import org.usfirst.frc.team6400.robot.commands.BallPickupReverse;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.buttons.Trigger;
import org.usfirst.frc.team6400.robot.commands.OpenGear;
import org.usfirst.frc.team6400.robot.commands.CloseGear;
import org.usfirst.frc.team6400.robot.commands.WinchOn;
import org.usfirst.frc.team6400.robot.commands.WinchOff;
//import org.usfirst.frc.team6400.robot.commands.LowerIntake;
//import org.usfirst.frc.team6400.robot.commands.PosCatForLaunch;
//import org.usfirst.frc.team6400.robot.commands.PosCatForLoad;
//import org.usfirst.frc.team6400.robot.commands.RaiseIntake;
import org.usfirst.frc.team6400.robot.commands.SwitchDirection;
import libraries.XboxController;
/**
* This class is the glue that binds the controls on the physical operator
* interface to the commands and command groups that allow control of the robot.
*/
public class OI {
public XboxController leftController = new XboxController(0);
//UPDATE LIST
//RightTrigger - opengeargobbler
//LeftTrigger - closegeargobbler
//Y - start winch
//B - stop winch
//A - do something
//X - do something
//LeftBumper - do something
//RightBumper - do something
//Start - do something
//Back - do something
public OI() {
leftController.setDeadband(0.2);
//Winch
Button startWinch = new JoystickButton(leftController, XboxController.Y);
//Button autoAim = new JoystickButton(driveController, XboxController.Start);
Button stopWinch = new JoystickButton(leftController, XboxController.X);
startWinch.whenPressed(new startWinch());
stopLatch.whenPressed(new stopWinch());
//Gear
// Button gearOpen = new JoystickButton(leftController, XboxController.RightTrigger);
// Button gearClose = new JoystickButton(leftController, XboxController.LeftTrigger);
// launch.whenPressed(new Launch());
// lockLatch.whenPressed(new LockLatch());
// LaunchGroup.whenPressed(new LaunchGroup());
// //Driving
// Button switchDirection = new JoystickButton(driveController, XboxController.Start);
// switchDirection.whenPressed(new SwitchDirection());
}
}