<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 edu.cold.logic.subsystems;

import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.RobotDrive;

import edu.cold.logic.commands.Driver;
import edu.cold.logic.OI;
import edu.cold.logic.Var;

/**
 *
 * @author thayeryates
 */
public class DriveTrain extends Subsystem
{
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    private Jaguar  frontLeftMotor = new Jaguar(Var.leftMotor1),
             frontRightMotor = new Jaguar(Var.rightMotor1),
             rearLeftMotor = new Jaguar(Var.leftMotor2),
             rearRightMotor = new Jaguar(Var.rightMotor2);
    private RobotDrive drive;
    private DoubleSolenoid shift = new DoubleSolenoid(Var.highShift,Var.lowShift); 
    private Value high = Value.kForward,
                  low = Value.kReverse;
    OI oi=new OI();
    
    public DriveTrain() {
        drive = new RobotDrive(frontLeftMotor, rearLeftMotor, frontRightMotor, rearRightMotor);
        Var.log.println("DriveTrain online");
    }

    public void initDefaultCommand()    {
        // Set the default command for a subsystem here.
	//setDefaultCommand(new MySpecialCommand());
        setDefaultCommand(new Driver());
    }
    
     /**
     * Moves the system forward at specified percent of voltage
     * @author thayeryates
     * @param voltage	DoublePercentage of desired voltage
    */
    public void GoForward (double voltage)  {
        drive.setLeftRightMotorOutputs(voltage, voltage);
        Var.log.println("Set left & right motor to " + voltage);
    }
    
    /**
     * Moves the system backward at specified percent of voltage
     * @author thayeryates
     * @param voltage	DoublePercentage of desired voltage
    */
    public void GoBackward (double voltage)  {
        drive.setLeftRightMotorOutputs(-voltage, -voltage);
        Var.log.println("Set left & right motor to " + -voltage);
    }
    
     /**
     * Halts the drivetrain
     * @author thayeryates
     * @since Scarab (1.1.1)
     */
    public void Stop()  {
        drive.setLeftRightMotorOutputs(0, 0);
        Var.log.println("Stopped Left and Right Motors");
    }
    /**
     * Interprets Joystick input for motors
     * @author thayeryates
     * @since Scarab (1.0.0)
     */
    public void JoyDrive(){
        drive.arcadeDrive(oi.getDriveX(),oi.getDriveY());
    }

    public void ShiftHigh(){
        shift.set(high);
        Var.log.println("Shift into high gear");
        
    }
    public void ShiftLow(){
        shift.set(low);
        Var.log.println("Shift into low gear");
    }
        
}<commit_msg>fixed logging phrasing; added 2 javadocs<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 edu.cold.logic.subsystems;

import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.RobotDrive;

import edu.cold.logic.commands.Driver;
import edu.cold.logic.OI;
import edu.cold.logic.Var;

/**
 *
 * @author thayeryates
 */
public class DriveTrain extends Subsystem
{
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    private Jaguar  frontLeftMotor = new Jaguar(Var.leftMotor1),
             frontRightMotor = new Jaguar(Var.rightMotor1),
             rearLeftMotor = new Jaguar(Var.leftMotor2),
             rearRightMotor = new Jaguar(Var.rightMotor2);
    private RobotDrive drive;
    private DoubleSolenoid shift = new DoubleSolenoid(Var.highShift,Var.lowShift); 
    private Value high = Value.kForward,
                  low = Value.kReverse;
    OI oi=new OI();
    
    public DriveTrain() {
        drive = new RobotDrive(frontLeftMotor, rearLeftMotor, frontRightMotor, rearRightMotor);
        Var.log.println("DriveTrain online");
    }

    public void initDefaultCommand()    {
        // Set the default command for a subsystem here.
	//setDefaultCommand(new MySpecialCommand());
        setDefaultCommand(new Driver());
    }
    
     /**
     * Moves the system forward at specified percent of voltage
     * @author thayeryates
     * @param voltage	Double—Percentage of desired voltage
     * @since Scarab (1.2.0)
    */
    public void GoForward (double voltage)  {
        drive.setLeftRightMotorOutputs(voltage, voltage);
        Var.log.println("Set DriveTrain to " + voltage + "% voltage");
    }
    
    /**
     * Moves the system backward at specified percent of voltage
     * @author thayeryates
     * @param voltage	Double—Percentage of desired voltage
     * @since Scarab (1.2.0)
    */
    public void GoBackward (double voltage)  {
        drive.setLeftRightMotorOutputs(-voltage, -voltage);
        Var.log.println("Set DriveTrain to " + -voltage + "% voltage");
    }
    
     /**
     * Halts the drivetrain
     * @author thayeryates
     * @since Scarab (1.1.1)
     */
    public void Stop()  {
        drive.setLeftRightMotorOutputs(0, 0);
        Var.log.println("Stopped DriveTrain motors");
    }
    /**
     * Interprets Joystick input for motors
     * @author thayeryates
     * @since Scarab (1.0.0)
     */
    public void JoyDrive(){
        drive.arcadeDrive(oi.getDriveX(),oi.getDriveY());
    }

    /**
     * Shifts into high gear
     * @author thayeryates
     * @since Scarab (1.1.2)
    */
    public void ShiftHigh(){
        shift.set(high);
        Var.log.println("Shifted into high gear");
        
    }

    /**
     * Shifts into high gear
     * @author thayeryates
     * @since Scarab (1.1.2)
    */
    public void ShiftLow(){
        shift.set(low);
        Var.log.println("Shifted into low gear");
    }
        
}
{'fraction_non_alphanumeric': 0.10443652849740932, 'fraction_numerical': 0.005990932642487046, 'mean_word_length': 2.589192330040674, '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': '3824250', 'n_tokens_mistral': 2002, 'n_tokens_neox': 1891, 'n_words': 479}