package org.ftcTeam.configurations;

import com.qualcomm.robotcore.hardware.ColorSensor;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
import com.qualcomm.robotcore.hardware.Servo;
import com.qualcomm.robotcore.hardware.HardwareMap;
import org.ftcbootstrap.RobotConfiguration;
import org.ftcbootstrap.components.utils.TelemetryUtil;


/**
 * FTCTeamRobot Saved Configuration
 * <p/>
 * It is assumed that there is a configuration on the phone running the Robot Controller App with the same name as this class and
 * that  configuration is the one that is marked 'activated' on the phone.
 * It is also assumed that the device names in the 'init()' method below are the same  as the devices named for the
 * saved configuration on the phone.
 */
public class Team8702Prod extends RobotConfiguration {
    //51.4 = 1 inch
    //motors
    public DcMotor motorR;
    public DcMotor motorL;
    public DcMotor liftMotor;
//    public ColorSensor mrColor1;
    public Servo rightServo;
    public Servo leftServo;


    /**
     * Factory method for this class
     *
     * @param hardwareMap
     * @param telemetryUtil
     * @return
     */
    public static Team8702Prod newConfig(HardwareMap hardwareMap, TelemetryUtil telemetryUtil) {

        Team8702Prod config = new Team8702Prod();
        config.init(hardwareMap, telemetryUtil);
        return config;
    }

    /**
     * Assign your class instance variables to the saved device names in the hardware map
     *
     *
     * @param hardwareMap
     * @param telemetryUtil
     */
    @Override
    protected void init(HardwareMap hardwareMap, TelemetryUtil telemetryUtil) {

        setTelemetry(telemetryUtil);

          motorR = (DcMotor) getHardwareOn("motorR", hardwareMap.dcMotor);
          motorL = (DcMotor) getHardwareOn("motorL", hardwareMap.dcMotor);
        motorL.setDirection(DcMotorSimple.Direction.REVERSE);
        rightServo = (Servo) getHardwareOn("servoR", hardwareMap.servo);
        leftServo = (Servo) getHardwareOn("servoL", hardwareMap.servo);
        liftMotor = (DcMotor) getHardwareOn("liftStick1", hardwareMap.dcMotor);
//       mrColor1 = (ColorSensor) getHardwareOn("mrColor1", hardwareMap.colorSensor);

    }


}

@@ -906,16 +906,17 @@
 or motor
+B
 R;%0A    p
@@ -934,16 +934,17 @@
 or motor
+B
 L;%0A    p
@@ -961,111 +961,44 @@
 tor 
-liftMotor;%0A//    public ColorSensor mrColor1;%0A    public Servo rightServo;%0A    public Servo leftServo;%0A
+motorFR;%0A    public DcMotor motorFL;
 %0A%0A  
@@ -1673,16 +1673,17 @@
    motor
+B
 R = (DcM
@@ -1708,16 +1708,17 @@
 n(%22motor
+B
 R%22, hard
@@ -1750,16 +1750,17 @@
    motor
+B
 L = (DcM
@@ -1785,16 +1785,17 @@
 n(%22motor
+B
 L%22, hard
@@ -1825,16 +1825,17 @@
    motor
+B
 L.setDir
@@ -1887,162 +1887,19 @@
     
-rightServo = (Servo) getHardwareOn(%22servoR%22, hardwareMap.servo);%0A        leftServo = (Servo) getHardwareOn(%22servoL%22, hardwareMap.servo);%0A        liftMotor
+    motorFR
  = (
@@ -1899,33 +1899,33 @@
 rFR = (DcMotor) 
-g
+G
 etHardwareOn(%22li
@@ -1926,18 +1926,15 @@
 On(%22
-liftStick1
+motorFR
 %22, h
@@ -1958,18 +1958,17 @@
 r);%0A
-//
+ 
        m
 rCol
@@ -1967,33 +1967,28 @@
    m
-rColor1 = (ColorSens
+otorFL = (DcMot
 or) 
-g
+G
 etHa
@@ -2002,15 +2002,14 @@
 n(%22m
-rColor1
+otorFL
 %22, h
@@ -2023,23 +2023,18 @@
 Map.
-colorSens
+dcMot
 or);%0A
-%0A
     

update *.iml