Change to 2 space instead of 4 space per Danny's request
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / Robot.java
index 7e9fabeccff07dc21046aafc3c3518a8a1885c69..0e4d9348556f06e6da292ef66a7028da9b67df1c 100644 (file)
@@ -10,60 +10,60 @@ import edu.wpi.first.wpilibj.Timer;
 import edu.wpi.first.wpilibj.command.Scheduler;
 
 public class Robot extends IterativeRobot {
-    static Timer timer;
-    public static OI oi;
-    public static DriveTrain driveTrain;
-    public static Arm arm;
-    public static Claw claw;
-    public static Compressor compressor;
+  static Timer timer;
+  public static OI oi;
+  public static DriveTrain driveTrain;
+  public static Arm arm;
+  public static Claw claw;
+  public static Compressor compressor;
 
-    public void robotInit() {
-        RobotMap.init();
-        driveTrain = new DriveTrain();
-        arm = new Arm();
-        claw = new Claw();
-        oi = new OI();
-        compressor = new Compressor(RobotMap.COMPRESSOR_PORT);
-    }
+  public void robotInit() {
+    RobotMap.init();
+    driveTrain = new DriveTrain();
+    arm = new Arm();
+    claw = new Claw();
+    oi = new OI();
+    compressor = new Compressor(RobotMap.COMPRESSOR_PORT);
+  }
 
-    public void autonomousInit() {
-    }
+  public void autonomousInit() {
+  }
 
-    public void autonomousPeriodic() {
-        Scheduler.getInstance().run();
-    }
+  public void autonomousPeriodic() {
+    Scheduler.getInstance().run();
+  }
 
-    public void teleopInit() {
-        System.out.println("running teleopInit");
-    }
+  public void teleopInit() {
+    System.out.println("running teleopInit");
+  }
 
-    public void teleopPeriodic() {
-        Scheduler.getInstance().run();
+  public void teleopPeriodic() {
+    Scheduler.getInstance().run();
 
-    }
+  }
 
-    public void operate() {
-        driveTrain.arcadeDrive(OI.rightJoystick.getY(),
-                OI.rightJoystick.getTwist());
-        claw.doTriggerAction();
-        if (OI.leftJoystick.getRawButton(8)) {
-            arm.setArmSpeeds(0.3);
-        } else if (OI.leftJoystick.getRawButton(9)) {
-            arm.setArmSpeeds(-0.3);
-        } else if (OI.leftJoystick.getRawButton(6)) {
-            arm.setLeft(0.3);
-        } else if (OI.leftJoystick.getRawButton(7)) {
-            arm.setLeft(-0.3);
-        } else if (OI.leftJoystick.getRawButton(11)) {
-            arm.setRight(-0.3);
-        } else if (OI.leftJoystick.getRawButton(10)) {
-            arm.setRight(0.3);
-        }
-        if (Math.abs(OI.leftJoystick.getY()) < 0.05) {
-            arm.setArmSpeeds(0);
+  public void operate() {
+    driveTrain
+        .arcadeDrive(OI.rightJoystick.getY(), OI.rightJoystick.getTwist());
+    claw.doTriggerAction();
+    if (OI.leftJoystick.getRawButton(8)) {
+      arm.setArmSpeeds(0.3);
+    } else if (OI.leftJoystick.getRawButton(9)) {
+      arm.setArmSpeeds(-0.3);
+    } else if (OI.leftJoystick.getRawButton(6)) {
+      arm.setLeft(0.3);
+    } else if (OI.leftJoystick.getRawButton(7)) {
+      arm.setLeft(-0.3);
+    } else if (OI.leftJoystick.getRawButton(11)) {
+      arm.setRight(-0.3);
+    } else if (OI.leftJoystick.getRawButton(10)) {
+      arm.setRight(0.3);
+    }
+    if (Math.abs(OI.leftJoystick.getY()) < 0.05) {
+      arm.setArmSpeeds(0);
 
-        } else {
-            arm.fineTuneControl(OI.leftJoystick.getY());
-        }
+    } else {
+      arm.fineTuneControl(OI.leftJoystick.getY());
     }
+  }
 }