Test Failed
Push — master ( d9c046...9db1c9 )
by John
04:04 queued 01:56
created

org.usfirst.frc.team3695.robot.OI.OI()   A

Complexity

Conditions 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
rs 9.85
cc 1
1
package org.usfirst.frc.team3695.robot;
2
3
import org.usfirst.frc.team3695.robot.commands.ButtonCommandClamp;
4
import org.usfirst.frc.team3695.robot.commands.ButtonCommandEat;
5
import org.usfirst.frc.team3695.robot.commands.ButtonCommandKillCompressor;
6
import org.usfirst.frc.team3695.robot.commands.ButtonCommandSpit;
7
import org.usfirst.frc.team3695.robot.enumeration.Direction;
8
import org.usfirst.frc.team3695.robot.util.Xbox;
9
10
import edu.wpi.first.wpilibj.Joystick;
11
import edu.wpi.first.wpilibj.buttons.Button;
12
import edu.wpi.first.wpilibj.buttons.JoystickButton;
13
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
14
15
/** the output/input setup */
16
public class OI {
17
	
18
	public static final Joystick DRIVER = new Joystick(0);
19
	public static final Joystick OPERATOR = new Joystick(1);
20
	
21
	/** 
22
	 * assigns what every SmartDash and controller button does
23
	 * 
24
	 * ye() gets called at teleop enable, assigning button values to controller input
25
	 * still in ye(), below controller value assigns, place each SmartDash button
26
	 * */
27
	public OI() {
0 ignored issues
show
Best Practice introduced by
Hide this public constructor.
Loading history...
28
		/// manipulator wheels
29
			Button spinIn = new JoystickButton(OPERATOR, Xbox.LB);
30
				spinIn.whileHeld(new ButtonCommandEat());
31
			Button spinOut = new JoystickButton(OPERATOR, Xbox.RB);
32
				spinOut.whileHeld(new ButtonCommandSpit());
33
		/// manipulator clamp
34
			Button toggleClamp = new JoystickButton(OPERATOR, Xbox.RB);
35
				toggleClamp.toggleWhenActive(new ButtonCommandClamp());
36
		/// To Compress, or Not To Compress. It is now an option.
37
			SmartDashboard.putData("Disable Compressor", new ButtonCommandKillCompressor());
38
	}
39
	
40
}