forked from rockyMountainRobotics/rmr2019
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitchMode.java
More file actions
43 lines (36 loc) · 750 Bytes
/
SwitchMode.java
File metadata and controls
43 lines (36 loc) · 750 Bytes
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
package frc.robot;
public class SwitchMode extends Component
{
public static char mode;
public SwitchMode()
{
//Automatically sets the mode to hatch mode on initialization
mode = 'H';
}
@Override
public void update()
{
//If the Y button is pressed, switch modes and reset previously used manipulator.
if(RobotMap.manipController.getRawButton(XboxMap.Y))
{
if(mode == 'H')
{
HatchManip.reset();
mode = 'C';
}
else
{
BallManip.reset();
mode = 'H';
}
}
}
@Override
public void autoUpdate()
{
}
@Override
public void disable()
{
}
}