X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc3501%2FRiceCatRobot%2Frobot%2FOI.java;fp=src%2Forg%2Fusfirst%2Ffrc3501%2FRiceCatRobot%2Frobot%2FOI.java;h=6bebe5445fcff4c3ac02fce576614f2f1a109c44;hb=4b8a525ff87cb3ba85058e8b53f5e896a25320bb;hp=0000000000000000000000000000000000000000;hpb=284904c741c7a805b8611302f6beed3b7f34e90f;p=3501%2F2015-FRC-Spark diff --git a/src/org/usfirst/frc3501/RiceCatRobot/robot/OI.java b/src/org/usfirst/frc3501/RiceCatRobot/robot/OI.java new file mode 100644 index 0000000..6bebe54 --- /dev/null +++ b/src/org/usfirst/frc3501/RiceCatRobot/robot/OI.java @@ -0,0 +1,31 @@ +package org.usfirst.frc3501.RiceCatRobot.robot; + +import org.usfirst.frc3501.RiceCatRobot.commands.ToggleClaw; +import org.usfirst.frc3501.RiceCatRobot.commands.ToggleCompressor; + +import edu.wpi.first.wpilibj.Joystick; +import edu.wpi.first.wpilibj.buttons.JoystickButton; + +public class OI { + public static Joystick leftJoystick; + public static Joystick rightJoystick; + public static JoystickButton trigger; + public static JoystickButton toggleCompressor; + public static JoystickButton toggleClaw; + + public OI() { + System.out.println("OI is open"); + leftJoystick = new Joystick(RobotMap.LEFT_STICK_PORT); + rightJoystick = new Joystick(RobotMap.RIGHT_STICK_PORT); + + trigger = new JoystickButton(rightJoystick, RobotMap.TRIGGER_PORT); + + toggleClaw = new JoystickButton(rightJoystick, RobotMap.TOGGLE_PORT); + toggleClaw.whenPressed(new ToggleClaw()); + + toggleCompressor = new JoystickButton(rightJoystick, + RobotMap.TOGGLE_COMPRESSOR_PORT); + toggleCompressor.whenPressed(new ToggleCompressor()); + + } +}