fix conflicts
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / subsystems / DriveTrain.java
index 4117c6a45ec2635608d6aaba91aaa7f4c0c5fe5f..c02dea95c941048dd6fd9651de673386fb576864 100644 (file)
@@ -1,6 +1,6 @@
 package org.usfirst.frc3501.RiceCatRobot.subsystems;
 
-import org.usfirst.frc3501.RiceCatRobot.RobotMap;
+import org.usfirst.frc3501.RiceCatRobot.robot.RobotMap;
 
 import edu.wpi.first.wpilibj.CANJaguar;
 import edu.wpi.first.wpilibj.Encoder;
@@ -30,7 +30,7 @@ public class DriveTrain extends Subsystem {
   }
 
   public double getRightSpeed() {
-    // Returns in per second
+    // Returns inches per second
     return rightEncoder.getRate();
   }
 
@@ -38,16 +38,24 @@ public class DriveTrain extends Subsystem {
     return leftEncoder.getRate();
   }
 
+  public double getAverageSpeed() {
+    return (getRightSpeed() + getLeftSpeed()) / 2;
+  }
+
   public double getRightDistance() {
-    // Returns distance in in
+    // Returns distance in inches
     return rightEncoder.getDistance();
   }
 
   public double getLeftDistance() {
-    // Returns distance in in
+    // Returns distance in inches
     return leftEncoder.getDistance();
   }
 
+  public void stop() {
+    setMotorSpeeds(0, 0);
+  }
+
   public void setMotorSpeeds(double leftSpeed, double rightSpeed) {
     if (Math.abs(leftSpeed) < RobotMap.DRIVE_DEAD_ZONE) {
       leftSpeed = 0;
@@ -104,8 +112,4 @@ public class DriveTrain extends Subsystem {
   @Override
   protected void initDefaultCommand() {
   }
-
-  public void stop() {
-    setMotorSpeeds(0, 0);
-  }
 }