package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Servo;

/**
 * This class rotates the motor in the direction of the target, based on the
 * relative location of the target as determined by TargetLocator
 *
 * @author (Mark Macerato, Team 3167)
 * @version (March 2, 2014)
 */
class Motor {

    private double acceptableRange;  //The distance to the left or right of the target in inches that is acceptable
    private Servo motor = new Servo(1, 1);  //The Servo that controls the rotating motor that aligns with the target

    public void trackTheTarget() {  //Rotates the motor aligning with the target.  If the camera is too far to the left, it roates the motor right, and vice versa

        if (TargetLocator.getRelPositionOfTarget() > acceptableRange) {  //if the target is too far to the right

            motor.set(1.0);

        } else if (TargetLocator.getRelPositionOfTarget() < -acceptableRange) {  //if the target is too far to the left

            motor.set(0.0);

        } else if (TargetLocator.getRelPositionOfTarget() < acceptableRange && TargetLocator.getRelPositionOfTarget() > -acceptableRange) {  //If the camera is aligned

            motor.set(motor.get());

        }

    }
}

@@ -863,24 +863,78 @@
 r.set(1.0);%0D
+%0A            dirverStation.print(%22Turning right...%22);%0D
 %0A%0D%0A        %7D
@@ -1072,26 +1072,91 @@
 .set(0.0);%0D%0A
+            dirverStation.print(%22Turning left...%22);%0D%0A            
 %0D%0A
-
         %7D el
@@ -1310,24 +1310,24 @@
  aligned%0D%0A%0D%0A
-
             
@@ -1350,16 +1350,62 @@
 get());%0D
+%0A            dirverStation.print(%22Aligned!%22);%0D
 %0A%0D%0A     

Update Motor.java