<commit_before>package org.usfirst.frc.team687.robot;

import org.usfirst.frc.team687.robot.commands.*;
import org.usfirst.frc.team687.robot.commands.auto.*;
import org.usfirst.frc.team687.robot.constants.IntakeConstants;
import org.usfirst.frc.team687.robot.constants.ShooterConstants;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 * 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.
 * 
 * @author tedfoodlin
 * 
 */

public class OI {
	
	public Joystick driveJoyLeft = new Joystick(0);
	public Joystick driveJoyRight = new Joystick(1);
	public Joystick articJoy = new Joystick(2);
	
	// buttons on driveJoyRight
	public JoystickButton shiftUp_1;
	public JoystickButton shiftDown_6;
	public JoystickButton zeroGyro_7;
	public JoystickButton snapToTarget_8;
	
	// articJoy
	public JoystickButton intake_9;
	public JoystickButton outtake_7; 
	public JoystickButton intakeOff_1;
	
	public JoystickButton intakeReset_12; // press this everytime you want to set a new intake angle
	
	public JoystickButton intakeTuck_11; 
	public JoystickButton intakeBall_8;
	
	public JoystickButton intakeResting_6;
	public JoystickButton intakeManual_10;
	
	public JoystickButton batterShot_2;
	public JoystickButton outerworksShot_5;
	public JoystickButton lowgoalShot_4;
	
	public JoystickButton shotReset_3;
	
	public OI() {
		shiftUp_1 = new JoystickButton(driveJoyRight, 1);
		shiftUp_1.whenPressed(new ShiftHigh());
		shiftDown_6 = new JoystickButton(driveJoyRight, 6);
		shiftDown_6.whenPressed(new ShiftLow());
		zeroGyro_7 = new JoystickButton(driveJoyRight, 7);
		zeroGyro_7.whenPressed(new ResetGyro());
		snapToTarget_8 = new JoystickButton(driveJoyRight, 8);
		snapToTarget_8.whenPressed(new SnapToTarget());
		
		intake_9 = new JoystickButton(articJoy, 9);
		intake_9.whenPressed(new IntakeRollersOn());
		outtake_7 = new JoystickButton(articJoy, 7);
		outtake_7.whenPressed(new IntakeRollersReverse());
		
		intakeReset_12 = new JoystickButton(articJoy, 12);<commit_msg>add emergency cancel<commit_after>package org.usfirst.frc.team687.robot;

import org.usfirst.frc.team687.robot.commands.*;
import org.usfirst.frc.team687.robot.commands.auto.*;
import org.usfirst.frc.team687.robot.constants.IntakeConstants;
import org.usfirst.frc.team687.robot.constants.ShooterConstants;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 * 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.
 * 
 * @author tedfoodlin
 * 
 */

public class OI {
	
	public Joystick driveJoyLeft = new Joystick(0);
	public Joystick driveJoyRight = new Joystick(1);
	public Joystick articJoy = new Joystick(2);
	
	// buttons on driveJoyRight
	public JoystickButton shiftUp_1;
	public JoystickButton shiftDown_6;
	public JoystickButton zeroGyro_7;
	public JoystickButton snapToTarget_8;
	
	public JoystickButton clearAll_4;
	
	// articJoy
	public JoystickButton intake_9;
	public JoystickButton outtake_7; 
	public JoystickButton intakeOff_1;
	
	public JoystickButton intakeReset_12; // press this everytime you want to set a new intake angle
	
	public JoystickButton intakeTuck_11; 
	public JoystickButton intakeBall_8;
	
	public JoystickButton intakeResting_6;
	public JoystickButton intakeManual_10;
	
	public JoystickButton batterShot_2;
	public JoystickButton outerworksShot_5;
	public JoystickButton lowgoalShot_4;
	
	public JoystickButton shotReset_3;
	
	public OI() {
		shiftUp_1 = new JoystickButton(driveJoyRight, 1);
		shiftUp_1.whenPressed(new ShiftHigh());
		shiftDown_6 = new JoystickButton(driveJoyRight, 6);
		shiftDown_6.whenPressed(new ShiftLow());
		zeroGyro_7 = new JoystickButton(driveJoyRight, 7);
		zeroGyro_7.whenPressed(new ResetGyro());
		snapToTarget_8 = new JoystickButton(driveJoyRight, 8);
		snapToTarget_8.whenPressed(new SnapToTarget());
		
		clearAll_4 = new JoystickButton(driveJoyRight, 4);
		clearAll_4.cancelWhenPressed(Robot.drive.getCurrentCommand());
		clearAll_4.cancelWhenPressed(Robot.intake.getCurrentCommand());
		clearAll_4.cancelWhenPressed(Robot.shooter.getCurrentCommand());
		clearAll_4.cancelWhenPressed(Robot.flywheels.getCurrentCommand());
		
		intake_9 = new JoystickButton(articJoy, 9);
		intake_9.whenPressed(new IntakeRollersOn());
		outtake_7 = new JoystickButton(articJoy, 7);
		outtake_7.whenPressed(new IntakeRollersReverse());
		
		intakeReset_12 = new JoystickButton(articJoy, 12);
{'fraction_non_alphanumeric': 0.08278775079197466, 'fraction_numerical': 0.026399155227032733, 'mean_word_length': 5.698727015558699, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4140841', 'n_tokens_mistral': 1811, 'n_tokens_neox': 1543, 'n_words': 346}