<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.carbonauts.frc2014.subsystems;

import com.carbonauts.frc2014.Constants;
import com.carbonauts.frc2014.command.OperatorDriveCommand;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.command.Subsystem;

/**
 * Subsystem for managing all drive actions of the robot.
 * @author Nick
 */
public class Drive extends Subsystem {

    private Talon leftFrontDrive = new Talon(Constants.DRIVE_LEFT_FRONT);
    private Talon leftRearDrive = new Talon(Constants.DRIVE_LEFT_REAR);
    private Talon rightFrontDrive = new Talon(Constants.DRIVE_RIGHT_FRONT);
    private Talon rightRearDrive = new Talon(Constants.DRIVE_RIGHT_REAR);
    
    private RobotDrive robotDrive = new RobotDrive(
            leftFrontDrive,
            leftRearDrive, 
            rightFrontDrive, 
            rightRearDrive);
    
    private boolean driveEnabled = true;
    private int driveDirection = 1;
    
    /**
     * Method for driving the robot by specifying lateral motion (forward and
     * backward) and rotation.
     * @param lateralPower The power to drive forward/backward (-1 - 1) at.
     * @param rotationalPower The power to turn with (-1 - 1).
     */
    public void driveArcade(double lateralPower, double rotationalPower) {
        if(driveEnabled) {
            robotDrive.arcadeDrive(getDirection() * lateralPower, rotationalPower);
        } else {
            robotDrive.arcadeDrive(0,0);
        }
    }
    
    /**
     * Method for driving the robot by specifying left and right speeds
     * individually.
     * @param leftPower Speed to drive robot-left at.
     * @param rightPower Speed to drive robot-right at.
     */<commit_msg>Added a constructor in Drive<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.carbonauts.frc2014.subsystems;

import com.carbonauts.frc2014.Constants;
import com.carbonauts.frc2014.command.OperatorDriveCommand;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.command.Subsystem;

/**
 * Subsystem for managing all drive actions of the robot.
 * @author Nick
 */
public class Drive extends Subsystem {

    private Talon leftFrontDrive;
    private Talon leftRearDrive;
    private Talon rightFrontDrive;
    private Talon rightRearDrive;
    private RobotDrive robotDrive;
    
    private boolean driveEnabled;
    private int driveDirection;
    
    /**
     * Primary constructor for Drive
     */
    public Drive() {
        leftFrontDrive = new Talon(Constants.DRIVE_LEFT_FRONT);
        leftRearDrive = new Talon(Constants.DRIVE_LEFT_REAR);
        rightFrontDrive = new Talon(Constants.DRIVE_RIGHT_FRONT);
        rightRearDrive = new Talon(Constants.DRIVE_RIGHT_REAR);
        
        robotDrive = new RobotDrive(
            leftFrontDrive,
            leftRearDrive, 
            rightFrontDrive, 
            rightRearDrive);
        
        driveEnabled = true;
        driveDirection = 1;
    }
    
    /**
     * Method for driving the robot by specifying lateral motion (forward and
     * backward) and rotation.
     * @param lateralPower The power to drive forward/backward (-1 - 1) at.
     * @param rotationalPower The power to turn with (-1 - 1).
     */
    public void driveArcade(double lateralPower, double rotationalPower) {
        if(driveEnabled) {
            robotDrive.arcadeDrive(getDirection() * lateralPower, rotationalPower);
        } else {
            robotDrive.arcadeDrive(0,0);
        }
    }
    
    /**
     * Method for driving the robot by specifying left and right speeds
     * individually.
     * @param leftPower Speed to drive robot-left at.
     * @param rightPower Speed to drive robot-right at.
     */
{'fraction_non_alphanumeric': 0.07935697882112784, 'fraction_numerical': 0.009696351109977035, 'mean_word_length': 2.7656099903938522, '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': '5444075', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1100, 'n_words': 319}