<commit_before>/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;

import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.can.CANTimeoutException;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the SimpleRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends SimpleRobot {
    
    // Instance fields
    // int frontLeftMotor, int rearLeftMotor, int frontRightMotor, int rearRightMotor
    //RobotDrive chassis = new RobotDrive(7, 8, 6, 5);
    CANJaguar frontLeft;
    CANJaguar rearLeft;
    CANJaguar frontRight;
    CANJaguar rearRight;
    
    RobotDrive chassis;
    Joystick leftStick = new Joystick(1);
    Joystick rightStick = new Joystick(2);
    Joystick driveyStick = new Joystick(3);
    
    // TODO: connect shooter motor

    public RobotTemplate() throws CANTimeoutException {
        this.frontLeft = new CANJaguar(7);
        this.rearLeft = new CANJaguar(8);
        this.frontRight = new CANJaguar(6);
        this.rearRight = new CANJaguar(5);
        this.chassis = new RobotDrive(frontLeft, rearLeft, frontRight, rearRight);
    }

    
    /**
     * This function is called once each time the robot enters autonomous mode.
     */
    public void autonomous() {
        System.out.println("Hello world.");
        // TODO: write the loop
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while (isOperatorControl() && isEnabled()) {
            //chassis.tankDrive(leftStick, rightStick);
            //mecanumDrive_Polar(double magnitude, double direction, double rotation)
            //mecanumDrive_Cartesian(double x, double y, double rotation, double gyroAngle)
            double x = driveyStick.getX();
            x = Math.min(1.0, x);
            x = Math.max(-1.0, x);
            x *= 0.6;<commit_msg>Revert "Note to self"<commit_after>/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;

import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.can.CANTimeoutException;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the SimpleRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate extends SimpleRobot {
    
    // Instance fields
    // int frontLeftMotor, int rearLeftMotor, int frontRightMotor, int rearRightMotor
    //RobotDrive chassis = new RobotDrive(7, 8, 6, 5);
    CANJaguar frontLeft;
    CANJaguar rearLeft;
    CANJaguar frontRight;
    CANJaguar rearRight;
    
    RobotDrive chassis;
    Joystick leftStick = new Joystick(1);
    Joystick rightStick = new Joystick(2);
    Joystick driveyStick = new Joystick(3);

    public RobotTemplate() throws CANTimeoutException {
        this.frontLeft = new CANJaguar(7);
        this.rearLeft = new CANJaguar(8);
        this.frontRight = new CANJaguar(6);
        this.rearRight = new CANJaguar(5);
        this.chassis = new RobotDrive(frontLeft, rearLeft, frontRight, rearRight);
    }

    
    /**
     * This function is called once each time the robot enters autonomous mode.
     */
    public void autonomous() {
        System.out.println("Hello world.");
        // TODO: write the loop
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        chassis.setSafetyEnabled(true);
        while (isOperatorControl() && isEnabled()) {
            //chassis.tankDrive(leftStick, rightStick);
            //mecanumDrive_Polar(double magnitude, double direction, double rotation)
            //mecanumDrive_Cartesian(double x, double y, double rotation, double gyroAngle)
            double x = driveyStick.getX();
            x = Math.min(1.0, x);
            x = Math.max(-1.0, x);
            x *= 0.6;
{'fraction_non_alphanumeric': 0.14277958740499458, 'fraction_numerical': 0.00760043431053203, 'mean_word_length': 2.0773942093541202, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4555088', 'n_tokens_mistral': 1607, 'n_tokens_neox': 1516, 'n_words': 474}