package org.robockets.stronghold.robot.drivetrain;

import org.robockets.stronghold.robot.OI;
import org.robockets.stronghold.robot.Robot;

import edu.wpi.first.wpilibj.command.Command;

/**
 *
 */
public class Joyride extends Command {
	double stick;
	double leftTrigger;
	double rightTrigger;
	
    public Joyride() {
        requires(Robot.driveTrain);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
    	// 2 is lefttrigger and 3 is right while 1 is updown stick thing
    	stick = OI.joystick.getRawAxis(1);
    	leftTrigger = OI.joystick.getRawAxis(2);
    	rightTrigger = OI.joystick.getRawAxis(3);
    	
    	System.out.println(stick);
    	
    	if (leftTrigger > 0.1 && rightTrigger > 0.1) {
    		Robot.driveTrain.driveArcade(stick, 0);
    	} else if (rightTrigger > 0.1) {
    		Robot.driveTrain.driveArcade(stick, -rightTrigger);
    	} else if (leftTrigger > 0.1) {
    		Robot.driveTrain.driveArcade(stick, leftTrigger);
    	} else {
    		Robot.driveTrain.driveArcade(stick, 0);
    	}
    	
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return false;
    }

    // Called once after isFinished returns true
    protected void end() {
    	Robot.driveTrain.stop();
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    	end();
    }
}

@@ -559,609 +559,92 @@
    %09
-// 2 is lefttrigger and 3 is right while 1 is updown stick thing%0A    %09stick = OI.joystick.getRawAxis(1);%0A    %09leftTrigger = OI.joystick.getRawAxis(2);%0A    %09rightTrigger = OI.joystick.getRawAxis(3);%0A    %09%0A    %09System.out.println(stick);%0A    %09%0A    %09if (leftTrigger %3E 0.1 && rightTrigger %3E 0.1) %7B%0A    %09%09Robot.driveTrain.driveArcade(stick, 0);%0A    %09%7D else if (rightTrigger %3E 0.1) %7B%0A    %09%09Robot.driveTrain.driveArcade(stick, -rightTrigger);%0A    %09%7D else if (leftTrigger %3E 0.1) %7B%0A    %09%09Robot.driveTrain.driveArcade(stick, leftTrigger);%0A    %09%7D else %7B%0A    %09%09Robot.driveTrain.driveArcade(stick, 0);%0A    %09%7D%0A    %09
+Robot.driveTrain.driveArcade(OI.joystick.getRawAxis(1), -OI.joystick.getRawAxis(4));
 %0A   

Change drive controls to use second joystick