/*
 * @(#)RobotTemplate.java 1.0 11/9/14
 * 
 * Sean Bowers
 * 
 * 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.usfirst.FRC4068;

import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.usfirst.FRC4068.subsystems.*;

/**
 * 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 RobotMain extends SimpleRobot {
    References refs = new References();
    
    public void robotInit(){
  
    }
    
    /**
     * This function is called once each time the robot enters autonomous mode.
     */
    public void autonomous() {
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        Launcher.startCompressor();
        DriveTrain.setSafety(true);
        Claws.setSafety(true);
        double claws = 0;
        boolean holdClaws = false;
        while (isOperatorControl() && isEnabled()){
            DriveTrain.drive(DStation.getAxisDriver(1), -(DStation.getAxisDriver(2)));
            
            boolean[] coDriverButtons = DStation.getButtonsCoDriver();
            
            if(coDriverButtons[1]){
                Launcher.launchLauncher();
            }else if(coDriverButtons[3]){
                Launcher.retractLauncher();
            }
            
            boolean[] driverButtons = DStation.getButtonsDriver();
            
            if(driverButtons[2]){
                Claws.setOpenClose(1);
            }else if(driverButtons[3]){
                Claws.setOpenClose(-1);
            }
            
            if(!holdClaws) claws = DStation.getAxisDriver(3);
            if(driverButtons[1]){
                holdClaws = !holdClaws;
            }
            System.out.println(claws);
            Claws.setRaiseLower(claws);
            
            /**
             * Used for the drive train movement.
             * Should be less jerky.
             * Feel free to modify where necessary.
             * Should work for most drive train designs.
             */
             
             if (driverjoystick[8]){
                motor power = 100%;
            }
            else if (driverjoystick[7]){
                motor power = 87.5%;
            }
            else if (driverjoystick[6]){
                motor power = 75%;
            }
            else if (driverjoystick[5]){
                motor power = 62.5%;
            }
            else if (driverjoystick[4]){
                motor power = 50%;
            }
            else if (driverjoystick[3]){
                motor power = 37.5%;
            }
            else if (driverjoystick[2]){
                motor power = 25%;
            }
            else if (driverjoystick[1]){
                motor power = 12.5%;
            }


             
        }
    }
    
    /**
     * This function is called once each time the robot enters test mode.
     */
    public void test() {
    
    }
    
    public boolean isTeleop() {
        return (isOperatorControl() && isEnabled());
    }
    
}

@@ -2483,35 +2483,8 @@
  */%0A
-             %0A             
 if (
@@ -2501,30 +2501,16 @@
 tick
+%3E=
 %5B8%5D)%7B%0A
-                
 moto
@@ -2529,34 +2529,10 @@
 0%25;%0A
-            %7D%0A            
+%7D%0A
 else
@@ -2554,30 +2554,16 @@
 tick
+%3C=
 %5B7%5D)%7B%0A
-                
 moto
@@ -2583,39 +2583,9 @@
 5%25;%0A
-            %7D%0A            else 
+%0A
 if (
@@ -2602,30 +2602,16 @@
 tick
+%3C=
 %5B6%5D)%7B%0A
-                
 moto
@@ -2629,34 +2629,10 @@
 5%25;%0A
-            %7D%0A            
+%7D%0A
 else
@@ -2654,30 +2654,16 @@
 tick
+%3C=
 %5B5%5D)%7B%0A
-                
 moto
@@ -2683,39 +2683,9 @@
 5%25;%0A
-            %7D%0A            else 
+%0A
 if (
@@ -2702,30 +2702,16 @@
 tick
+%3C=
 %5B4%5D)%7B%0A
-                
 moto
@@ -2729,34 +2729,10 @@
 0%25;%0A
-            %7D%0A            
+%7D%0A
 else
@@ -2750,38 +2750,24 @@
 joystick
+%3C=
 %5B3%5D)%7B%0A
-                
 motor po
@@ -2783,39 +2783,9 @@
 5%25;%0A
-            %7D%0A            else 
+%0A
 if (
@@ -2798,38 +2798,24 @@
 joystick
+%3C=
 %5B2%5D)%7B%0A
-                
 motor po
@@ -2829,34 +2829,10 @@
 5%25;%0A
-            %7D%0A            
+%7D%0A
 else
@@ -2850,38 +2850,24 @@
 joystick
+%3C=
 %5B1%5D)%7B%0A
-                
 motor po
@@ -2879,28 +2879,22 @@
  12.5%25;%0A
-            
+%7D%0A%7D%0A%7D%0A
 %7D%0A%0A%0A    

Update RobotMain.java