<commit_before>package org.usfirst.frc.team4915.stronghold;
import java.io.IOException;
import java.io.InputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;

import org.usfirst.frc.team4915.stronghold.commands.GearShiftCommand;
import org.usfirst.frc.team4915.stronghold.commands.IntakeLauncher.IncrementLauncherHeightCommand;
import org.usfirst.frc.team4915.stronghold.commands.IntakeLauncher.IntakeBallCommandGroup;
import org.usfirst.frc.team4915.stronghold.commands.IntakeLauncher.LaunchBallCommandGroup;
import org.usfirst.frc.team4915.stronghold.commands.ScalerCommand;
import org.usfirst.frc.team4915.stronghold.subsystems.Scaler.State;
import org.usfirst.frc.team4915.stronghold.vision.robot.AutoAimControlCommand;
import org.usfirst.frc.team4915.stronghold.vision.robot.VisionState;

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

/**
 * This class handles the "operator interface", or the interactions between the
 * driver station and the robot code.
 */
public class OI {

    // create joysticks for driving and aiming the launcher
    public Joystick driveStick;
    public Joystick aimStick;
    public static final int DRIVE_STICK_PORT = 0;

    // Drive train two speed controls
    public JoystickButton speedUpButton;
    public JoystickButton slowDownButton;

    public static final int HIGH_SPEED_DRIVE_BUTTON = 4;
    public static final int LOW_SPEED_DRIVE_BUTTON = 3;

    // buttons are now correct until we decide to change them
    public static final int LAUNCHER_STICK_PORT = 1;
    public static final int LAUNCH_BALL_BUTTON_NUMBER = 1;
    public static final int INTAKE_BALL_BUTTON_NUMBER = 2;
    public static final int AUTO_AIM_BUTTON_NUMBER = 11;
    public static final int LAUNCHER_UP_BUTTON_NUMBER = 7;
    public static final int LAUNCHER_DOWN_BUTTON_NUMBER = 6;

    // FIXME: Scaling button values
    public static final int SCALER_REACH_BUTTON_NUMBER = 9;
    public static final int SCALER_LIFT_BUTTON_NUMBER = 10;

    public static final int UP_DIRECTION = 1;
    public static final int DOWN_DIRECTION = UP_DIRECTION * -1;

    // creates new buttons
    // launchBall triggers a command group with commands that ultimately will
    // shoot the ball
    // grabBall triggers a command group with commands that will get the ball
    // into the basket
    // launcherUp and launcherDown increment the launcher height by a small
    // amount
    public JoystickButton launchBallButton;
    public JoystickButton grabBallButton;
    public JoystickButton autoAimButton;
    public JoystickButton launcherUpButton;
    public JoystickButton launcherDownButton;
    public JoystickButton scalerReachButton;
    public JoystickButton scalerLiftButton;

    public OI() {
        this.driveStick = new Joystick(DRIVE_STICK_PORT);
        this.aimStick = new Joystick(LAUNCHER_STICK_PORT);

        // Bind module commands to buttons
        if (ModuleManager.DRIVE_MODULE_ON) {
            this.speedUpButton = new JoystickButton(driveStick, HIGH_SPEED_DRIVE_BUTTON);
            this.slowDownButton = new JoystickButton(driveStick, LOW_SPEED_DRIVE_BUTTON);

            this.speedUpButton.whenPressed(new GearShiftCommand(true));
            this.slowDownButton.whenPressed(new GearShiftCommand(false));<commit_msg>Changed the numbers for the buttons.<commit_after>package org.usfirst.frc.team4915.stronghold;
import java.io.IOException;
import java.io.InputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;

import org.usfirst.frc.team4915.stronghold.commands.GearShiftCommand;
import org.usfirst.frc.team4915.stronghold.commands.IntakeLauncher.IncrementLauncherHeightCommand;
import org.usfirst.frc.team4915.stronghold.commands.IntakeLauncher.IntakeBallCommandGroup;
import org.usfirst.frc.team4915.stronghold.commands.IntakeLauncher.LaunchBallCommandGroup;
import org.usfirst.frc.team4915.stronghold.commands.ScalerCommand;
import org.usfirst.frc.team4915.stronghold.subsystems.Scaler.State;
import org.usfirst.frc.team4915.stronghold.vision.robot.AutoAimControlCommand;
import org.usfirst.frc.team4915.stronghold.vision.robot.VisionState;

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

/**
 * This class handles the "operator interface", or the interactions between the
 * driver station and the robot code.
 */
public class OI {

    // create joysticks for driving and aiming the launcher
    public Joystick driveStick;
    public Joystick aimStick;
    public static final int DRIVE_STICK_PORT = 0;

    // Drive train two speed controls
    public JoystickButton speedUpButton;
    public JoystickButton slowDownButton;

    public static final int HIGH_SPEED_DRIVE_BUTTON = 4;
    public static final int LOW_SPEED_DRIVE_BUTTON = 3;

    // buttons are now correct until we decide to change them
    public static final int LAUNCHER_STICK_PORT = 1;
    public static final int LAUNCH_BALL_BUTTON_NUMBER = 1;
    public static final int INTAKE_BALL_BUTTON_NUMBER = 2;
    public static final int AUTO_AIM_BUTTON_NUMBER = 8;
    public static final int LAUNCHER_UP_BUTTON_NUMBER = 6;
    public static final int LAUNCHER_DOWN_BUTTON_NUMBER = 7;

    // FIXME: Scaling button values
    public static final int SCALER_REACH_BUTTON_NUMBER = 10;
    public static final int SCALER_LIFT_BUTTON_NUMBER = 11;

    public static final int UP_DIRECTION = 1;
    public static final int DOWN_DIRECTION = UP_DIRECTION * -1;

    // creates new buttons
    // launchBall triggers a command group with commands that ultimately will
    // shoot the ball
    // grabBall triggers a command group with commands that will get the ball
    // into the basket
    // launcherUp and launcherDown increment the launcher height by a small
    // amount
    public JoystickButton launchBallButton;
    public JoystickButton grabBallButton;
    public JoystickButton autoAimButton;
    public JoystickButton launcherUpButton;
    public JoystickButton launcherDownButton;
    public JoystickButton scalerReachButton;
    public JoystickButton scalerLiftButton;

    public OI() {
        this.driveStick = new Joystick(DRIVE_STICK_PORT);
        this.aimStick = new Joystick(LAUNCHER_STICK_PORT);

        // Bind module commands to buttons
        if (ModuleManager.DRIVE_MODULE_ON) {
            this.speedUpButton = new JoystickButton(driveStick, HIGH_SPEED_DRIVE_BUTTON);
            this.slowDownButton = new JoystickButton(driveStick, LOW_SPEED_DRIVE_BUTTON);

            this.speedUpButton.whenPressed(new GearShiftCommand(true));
            this.slowDownButton.whenPressed(new GearShiftCommand(false));
{'fraction_non_alphanumeric': 0.06484340538156154, 'fraction_numerical': 0.014997794441993825, 'mean_word_length': 4.164768413059985, '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': '3513450', 'n_tokens_mistral': 2168, 'n_tokens_neox': 2047, 'n_words': 524}