<commit_before>package org.usfirst.frc.team2791.commands;


import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc.team2791.abstractSubsystems.AbstractShakerShooterArm;
import org.usfirst.frc.team2791.util.ShakerCamera;

import static org.usfirst.frc.team2791.robot.Robot.*;

/**
 * Created by Akhil on 4/27/2016.
 * This is the code that uses the values from the camera to turn and lineup and fire
 */
public class AutoLineUpShot extends ShakerCommand implements Runnable {
    //This will decide which case to run
    private static final int STAGE_ONE = 0;
    //use one frame to lineup to the target and shoot
    private static final int SINGLE_FRAME_SHOT = 1;
    //single frame no shoot
    private static final int SINGLE_FRAME_LINEUP = 2;
    //multiple frames and shoot
    private static final int MULTIPLE_FRAME_SHOOT = 3;
    //special case after shooting
    private static final int AFTER_SHOT_CLEANUP = 4;
    //reset for anything than ran
    private static final int GENERAL_RESET = 5;
    private static final double angleMaxOutput = 0.6;
    //Settings
    // to correct any curving of the shot leftward or right ward
    public static double shootOffset = 0.5;
    //Run method flags
    private static boolean useMultipleFrames = false;
    private static boolean shootAfterAligned = false;
    private static boolean quickLineUpShot = false;
    //internal values
    private double targetTurnAngle = 0;
    private ShakerCamera.ParticleReport currentTarget;
    private Timer totalTime;
    private double frames_used = 0;

    public AutoLineUpShot() {
        totalTime = new Timer();
    }


    public void run() {
        while (running) {
            SmartDashboard.putNumber("Vision Shot stage: ", counter);
            switch (counter) {
                default:
                case STAGE_ONE:
                    //reset the number of frames that have been used
                    frames_used = 0;
                    //get a new frame<commit_msg>some minor optimization in logic for intake, and removed extra spacing<commit_after>package org.usfirst.frc.team2791.commands;


import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc.team2791.abstractSubsystems.AbstractShakerShooterArm;
import org.usfirst.frc.team2791.util.ShakerCamera;

import static org.usfirst.frc.team2791.robot.Robot.*;

/**
 * Created by Akhil on 4/27/2016.
 * This is the code that uses the values from the camera to turn and lineup and fire
 */
public class AutoLineUpShot extends ShakerCommand implements Runnable {
    //This will decide which case to run
    private static final int STAGE_ONE = 0;
    //use one frame to lineup to the target and shoot
    private static final int SINGLE_FRAME_SHOT = 1;
    //single frame no shoot
    private static final int SINGLE_FRAME_LINEUP = 2;
    //multiple frames and shoot
    private static final int MULTIPLE_FRAME_SHOOT = 3;
    //special case after shooting
    private static final int AFTER_SHOT_CLEANUP = 4;
    //reset for anything than ran
    private static final int GENERAL_RESET = 5;
    private static final double angleMaxOutput = 0.7;
    //Settings
    // to correct any curving of the shot leftward or right ward
    public static double shootOffset = 0.5;
    //Run method flags
    private static boolean useMultipleFrames = false;
    private static boolean shootAfterAligned = false;
    private static boolean quickLineUpShot = false;
    //internal values
    private double targetTurnAngle = 0;
    private ShakerCamera.ParticleReport currentTarget;
    private Timer totalTime;
    private double frames_used = 0;

    public AutoLineUpShot() {
        totalTime = new Timer();
    }


    public void run() {
        while (running) {
            SmartDashboard.putNumber("Vision Shot stage: ", counter);
            switch (counter) {
                default:
                case STAGE_ONE:
                    //reset the number of frames that have been used
                    frames_used = 0;
                    //get a new frame
{'fraction_non_alphanumeric': 0.06483489997589781, 'fraction_numerical': 0.01735357917570499, 'mean_word_length': 2.7693006357856493, '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': '2978626', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1139, 'n_words': 415}