<commit_before>// RobotBuilder Version: 1.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc3566.OfficialCode.subsystems;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.SpeedController;
import org.usfirst.frc3566.OfficialCode.RobotMap;
import org.usfirst.frc3566.OfficialCode.commands.*;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc3566.OfficialCode.Robot;
import org.usfirst.frc3566.OfficialCode.RobotConstants;
/**
 *
 */
public class ElToro extends Subsystem {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    SpeedController leftArm = RobotMap.elToroLeftArm;
    SpeedController rightArm = RobotMap.elToroRightArm;
    SpeedController elevator = RobotMap.elToroElevator;
    DigitalInput upperLimit = RobotMap.elToroUpperLimit;
    DigitalInput lowerLimit = RobotMap.elToroLowerLimit;
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
    
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    public void initDefaultCommand() {
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
        setDefaultCommand(new JoystickElToro());
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
	
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
    
    public void raise(double speed) {
        elevator.set(speed);
    }
    
    public void raise() {
        if (!atUpperLimit() && !Robot.catapult.isWinding()) {
            stopTwirling();
            raise(RobotConstants.EL_TORO_RAISE_SPEED);
        }
    }
    
    public void lower(double speed) {
        if (!atLowerLimit()) {
            elevator.set(speed);
        }
    }
    
    public void lower() {
        lower(RobotConstants.EL_TORO_LOWER_SPEED);
    }
    
    public void stop() {
        elevator.set(0);
    }
    
    public boolean atUpperLimit() {
        return upperLimit.get() == RobotConstants.EL_TORO_UPPER_LIMIT_CLOSED;
    }
    
    public boolean atLowerLimit() {
        return lowerLimit.get() == RobotConstants.EL_TORO_LOWER_LIMIT_CLOSED;
    }
    
    public void twirl(double speed) {
        leftArm.set(speed);
        rightArm.set(-speed);
    }
    
    public void twirlInward() {
        twirl(RobotConstants.EL_TORO_TWIRL_INWARD_SPEED);
    }
    
    public void twirlOutward() {
        twirl(RobotConstants.EL_TORO_TWIRL_OUTWARD_SPEED);
    }
    
    public void stopTwirling() {
        twirl(0);
    }
    
    public void monitor() {
        SmartDashboard.putData("El Toro Upper Limit", upperLimit);
        SmartDashboard.putData("El Toro Lower Limit", lowerLimit);
    }
}<commit_msg>Check Raise Right<commit_after>// RobotBuilder Version: 1.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc3566.OfficialCode.subsystems;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.SpeedController;
import org.usfirst.frc3566.OfficialCode.RobotMap;
import org.usfirst.frc3566.OfficialCode.commands.*;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.usfirst.frc3566.OfficialCode.Robot;
import org.usfirst.frc3566.OfficialCode.RobotConstants;

/**
 *
 */
public class ElToro extends Subsystem {
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS

    SpeedController leftArm = RobotMap.elToroLeftArm;
    SpeedController rightArm = RobotMap.elToroRightArm;
    SpeedController elevator = RobotMap.elToroElevator;
    DigitalInput upperLimit = RobotMap.elToroUpperLimit;
    DigitalInput lowerLimit = RobotMap.elToroLowerLimit;
    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS

    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    public void initDefaultCommand() {
        // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
        setDefaultCommand(new JoystickElToro());
        // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND

        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }

    public void raise(double speed) {
        if (!atUpperLimit() && !Robot.catapult.isWinding()) {
            stopTwirling();
            elevator.set(speed);
        }
    }

    public void raise() {
        raise(RobotConstants.EL_TORO_RAISE_SPEED);
    }

    public void lower(double speed) {
        if (!atLowerLimit()) {
            elevator.set(speed);
        }
    }

    public void lower() {
        lower(RobotConstants.EL_TORO_LOWER_SPEED);
    }

    public void stop() {
        elevator.set(0);
    }

    public boolean atUpperLimit() {
        return upperLimit.get() == RobotConstants.EL_TORO_UPPER_LIMIT_CLOSED;
    }

    public boolean atLowerLimit() {
        return lowerLimit.get() == RobotConstants.EL_TORO_LOWER_LIMIT_CLOSED;
    }

    public void twirl(double speed) {
        leftArm.set(speed);
        rightArm.set(-speed);
    }

    public void twirlInward() {
        twirl(RobotConstants.EL_TORO_TWIRL_INWARD_SPEED);
    }

    public void twirlOutward() {
        twirl(RobotConstants.EL_TORO_TWIRL_OUTWARD_SPEED);
    }

    public void stopTwirling() {
        twirl(0);
    }

    public void monitor() {
        SmartDashboard.putData("El Toro Upper Limit", upperLimit);
        SmartDashboard.putData("El Toro Lower Limit", lowerLimit);
    }
}
{'fraction_non_alphanumeric': 0.08911819887429644, 'fraction_numerical': 0.0075046904315197, 'mean_word_length': 3.087539936102236, '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': '5045597', 'n_tokens_mistral': 2049, 'n_tokens_neox': 1988, 'n_words': 464}