/*----------------------------------------------------------------------------*/
/* 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.templates;


import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;

public class Natasha2014 extends SimpleRobot {
    
    Joystick leftstick = new Joystick(1);
    Joystick rightstick = new Joystick(2);
    
    DriverStation ds;
    DriveTrain dt = new DriveTrain(Constants.leftForward, Constants.leftBackward, Constants.rightForward, Constants.rightBackward);
    Throweraterenator cat = new Throweraterenator();
    
    protected void robotInit() {
       ds = DriverStation.getInstance();
       System.out.println("RobotInit...");
       dt.setMotorsInverted();
    }
    
    public void autonomous() {
        
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        System.out.println("Teleop...");
        dt.setSafetyEnabled(true);
        while(isOperatorControl() && isEnabled()){
            if (leftstick.getRawButton(Constants.JB_DRIVE_SLOW)) {
                dt.arcadeDrive(leftstick.getY() * .7, leftstick.getX() * .5);
            } else {
                dt.arcadeDrive(leftstick.getY(), leftstick.getX() * .7);
            }
            // Catapult
            System.out.print(cat.encoderCount());
            System.out.println(", " + cat.getStatus());
            cat.setThrowSpeed(ds.getAnalogIn(1) / 5);
            cat.setThrowArc((int)(ds.getAnalogIn(2) / 5 * 400 + 800) );
            cat.setReturnSpeed(-0.3);
            if (leftstick.getRawButton(1)) {
                cat.Throw();
            }
            cat.update();
            
            Timer.delay(Constants.TIMER_DELAY_SECS);
        }        

    }
    
    /**
     * This function is called once each time the robot enters test mode.
     */
    public void test() {
    
    }
}

@@ -912,16 +912,93 @@
 on ds;%0D%0A
+    // Can we get this long line to be split onto 2 lines, for readability?%0D%0A
     Driv
@@ -1144,19 +1144,23 @@
 renator 
-cat
+thrower
  = new T
@@ -1224,50 +1224,8 @@
  %7B%0D%0A
-       ds = DriverStation.getInstance();%0D%0A
     
@@ -1260,24 +1260,66 @@
 Init...%22);%0D%0A
+       ds = DriverStation.getInstance();%0D%0A
        dt.se
@@ -1337,32 +1337,34 @@
 rted();%0D%0A    %7D%0D%0A
+%0D%0A
     %0D%0A    public
@@ -1400,24 +1400,26 @@
  %0D%0A    %7D%0D%0A%0D%0A
+%0D%0A
     /**%0D%0A   
@@ -1950,16 +1950,89 @@
  // 
-Catapult
+*** Thrower%0D%0A            // How about we change 'encoderCount()' to 'position()'?
 %0D%0A  
@@ -2058,19 +2058,23 @@
 t.print(
-cat
+thrower
 .encoder
@@ -2122,19 +2122,23 @@
 (%22, %22 + 
-cat
+thrower
 .getStat
@@ -2149,35 +2149,39 @@
 );%0D%0A            
-cat
+thrower
 .setThrowSpeed(d
@@ -2212,27 +2212,31 @@
             
-cat
+thrower
 .setThrowArc
@@ -2293,19 +2293,23 @@
         
-cat
+thrower
 .setRetu
@@ -2340,61 +2340,456 @@
     
-if (leftstick.getRawButton(1)) %7B%0D%0A                cat
+// setup constants joystick buttons.  For safety, I'd like 2 buttons to be pressed to%0D%0A            // initiate thrower. Use buttons at base on left and right hand side of stick so it%0D%0A            // takes two hands to initiate a throw.  This will be temporary, while we test/tune.%0D%0A            if (leftstick.getRawButton(1)) %7B%0D%0A                // What is the proper case presentation for methods.  Should this be 'throw()'?%0D%0A                thrower
 .Thr
@@ -2826,11 +2826,15 @@
     
-cat
+thrower
 .upd

Update Natasha2014.java