<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.usfirst.frc4946;

import edu.wpi.first.wpilibj.RobotDrive;

/**
 *
 * @author Stefan
 */
public class AutoTwoBall extends AutoMode {

    AutoMode autoRoutine = new AutoMode(m_robotDrive, m_launcher, m_loader, m_intakeArm, m_distanceSensor);
    int ballsFired = 0;
    public AutoTwoBall(RobotDrive drive, Launcher launcher, Loader loader, IntakeArm intakeArm, DistanceSensor distanceSensor) {
        super(drive, launcher, loader, intakeArm, distanceSensor);
    }

    public void init() {
        autoRoutine.extendArm();
        autoRoutine.startShooter();
        autoRoutine.setShooterSpeed(1800, true);
    }

    public void run() {
        if (ballsFired==0){
            if (autoRoutine.getCurrentShooterSpeed() >= 1700 && autoRoutine.getCurrentShooterSpeed() <= 1900){
                autoRoutine.extendLoader();
                ballsFired++;
                autoRoutine.setShooterSpeed(1900, true);
            }
        }
        if (ballsFired==1){
            autoRoutine.enableRollers();
            autoRoutine.driveToDistance((18.5*12.0), ballsFired);
            if (autoRoutine.atDistance(18.5*12.0) && autoRoutine.getCurrentShooterSpeed() >= 1800 && autoRoutine.getCurrentShooterSpeed() <= 2000){
                autoRoutine.extendLoader();
                ballsFired++;
            }
        }

    }

}<commit_msg>Fixed two ball auto<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.usfirst.frc4946;

import edu.wpi.first.wpilibj.RobotDrive;

/**
 *
 * @author Stefan
 */
public class AutoTwoBall extends AutoMode {

    AutoMode autoRoutine = new AutoMode(m_robotDrive, m_launcher, m_loader, m_intakeArm, m_distanceSensor);
    int ballsFired = 0;

    public AutoTwoBall(RobotDrive drive, Launcher launcher, Loader loader, IntakeArm intakeArm, DistanceSensor distanceSensor) {
        super(drive, launcher, loader, intakeArm, distanceSensor);
    }

    public void init() {
        autoRoutine.extendArm();
        autoRoutine.startShooter();
        autoRoutine.setShooterSpeed(1800, true);
    }

    public void run() {
        if (ballsFired == 0) {
            if (autoRoutine.getCurrentShooterSpeed() >= 1700 && autoRoutine.getCurrentShooterSpeed() <= 1900) {
                autoRoutine.extendLoader();
                ballsFired++;
                autoRoutine.setShooterSpeed(1800, true);
            }
        }
        if (ballsFired == 1) {
            autoRoutine.enableRollers();
            autoRoutine.driveToDistance((18.5 * 12.0), 0.4);
            if (autoRoutine.atDistance(18.5 * 12.0)) {
                ballsFired++;
            }

        }
        if (ballsFired == 2) {
            autoRoutine.disableRollers();
            autoRoutine.driveToDistance((16 * 12.0), 0.4);
            if (autoRoutine.atDistance(16 * 12.0) && autoRoutine.getCurrentShooterSpeed() >= 1700 && autoRoutine.getCurrentShooterSpeed() <= 1900) {
                autoRoutine.extendLoader();

            }

        }

    }

}
{'fraction_non_alphanumeric': 0.10763680096211665, 'fraction_numerical': 0.030366806975345762, 'mean_word_length': 2.516913319238901, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4810939', 'n_tokens_mistral': 1087, 'n_tokens_neox': 972, 'n_words': 215}