package com.qualcomm.ftcrobotcontroller.opmodes;

import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.hardware.DcMotor;


/**
 * TODO Created by Quest Jelinek on 9/8/2015. 
 * GitHub: TofuTheBland || https://github.com/TofuTheBland
 */
public class TeleOp extends OpMode {
    // TODO Initiate all variables
    DcMotor motor_leftFront; //Forward Left
    DcMotor motor_rightFront;
    DcMotor motor_leftBack; //Backward Left
    DcMotor motor_rightBack;
    Float driver_gamepad_x;
    Float driver_gamepad_y;


    @Override
    public void init() {
        // TODO Placeholder for hardware mapping, motor names may change
        motor_leftFront = hardwareMap.dcMotor.get("motor_1");
        motor_rightFront = hardwareMap.dcMotor.get("motor_2");
        motor_leftFront = hardwareMap.dcMotor.get("motor_3");
        motor_rightFront = hardwareMap.dcMotor.get("motor_4");

        //Added this for the lads
        driver_gamepad_x = gamepad1.left_stick_x;
        driver_gamepad_y = gamepad1.left_stick_y;
    }

    @Override
    public void loop() {

        // TODO Example method/action of the motor, in this case applying power


        if(driver_gamepad_y > 100)
        {
            //For the method .setPower() pass a value from -1 to 1 (inc. 0)
            motor_leftFront.setPower(1);
            motor_leftBack.setPower(1);
            motor_rightFront.setPower(1);
            motor_rightBack.setPower(1);

        }
        else if (driver_gamepad_y < -100)
        {
            motor_leftFront.setPower(-1);
            motor_leftBack.setPower(-1);
            motor_rightBack.setPower(-1);
            motor_rightFront.setPower(-1);
        }

        else if (driver_gamepad_x > 100)
        {
            motor_leftFront.setPower(1);
            motor_leftBack.setPower(1);
            motor_rightFront.setPower(-1);
            motor_rightBack.setPower(-1);
        }
        else if (driver_gamepad_x < -100)
        {
            motor_leftFront.setPower(-1);
            motor_leftBack.setPower(-1);
            motor_rightFront.setPower(1);
            motor_rightBack.setPower(1);
        }
        else
        {
            motor_leftFront.setPower(0);
            motor_leftBack.setPower(0);
            motor_rightFront.setPower(0);
            motor_rightBack.setPower(0);
        }

    }
}

@@ -42,17 +42,16 @@
 pmodes;%0A
-%0A
 import c
@@ -355,21 +355,16 @@
 tor_left
-Front
 ; //Forw
@@ -399,86 +399,8 @@
 ight
-Front;%0A    DcMotor motor_leftBack; //Backward Left%0A    DcMotor motor_rightBack
 ;%0A  
@@ -577,37 +577,32 @@
       motor_left
-Front
  = hardwareMap.d
@@ -635,37 +635,32 @@
      motor_right
-Front
  = hardwareMap.d
@@ -686,132 +686,8 @@
 %22);%0A
-        motor_leftFront = hardwareMap.dcMotor.get(%22motor_3%22);%0A        motor_rightFront = hardwareMap.dcMotor.get(%22motor_4%22);
 %0A%0A  
@@ -1094,53 +1094,8 @@
 left
-Front.setPower(1);%0A            motor_leftBack
 .set
@@ -1119,37 +1119,32 @@
      motor_right
-Front
 .setPower(1);%0A  
@@ -1145,48 +1145,8 @@
 1);%0A
-            motor_rightBack.setPower(1);
 %0A%0A  
@@ -1231,793 +1231,425 @@
 left
-Front.setPower(-1);%0A            motor_leftBack.setPower(-1);%0A            motor_rightBack.setPower(-1);%0A            motor_rightFront.setPower(-1);%0A        %7D%0A%0A        else if (driver_gamepad_x %3E 100)%0A        %7B%0A            motor_leftFront.setPower(1);%0A            motor_leftBack.setPower(1);%0A            motor_rightFront.setPower(-1);%0A            motor_rightBack.setPower(-1);%0A        %7D%0A        else if (driver_gamepad_x %3C -100)%0A        %7B%0A            motor_leftFront.setPower(-1);%0A            motor_leftBack.setPower(-1);%0A            motor_rightFront.setPower(1);%0A            motor_rightBack.setPower(1);%0A        %7D%0A        else%0A        %7B%0A            motor_leftFront.setPower(0);%0A            motor_leftBack.setPower(0);%0A            motor_rightFront.setPower(0);%0A            motor_rightBack
+.setPower(-1);%0A            motor_right.setPower(-1);%0A        %7D%0A%0A        else if (driver_gamepad_x %3E 100)%0A        %7B%0A            motor_left.setPower(1);%0A            motor_right.setPower(-1);%0A        %7D%0A        else if (driver_gamepad_x %3C -100)%0A        %7B%0A            motor_left.setPower(-1);%0A            motor_right.setPower(1);%0A        %7D%0A        else%0A        %7B%0A            motor_left.setPower(0);%0A            motor_right
 .set

Update TeleOp.java