Fix diverging conflicts, not sure how this happened but it did
authorKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:35:09 +0000 (19:35 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:35:09 +0000 (19:35 -0800)
1  2 
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index fd8f612278c760f5760c3ebcf9b20b04b601ea15,4a6c6890d6d031683e2b37d4df4f4a19f5a7a96c..2bb3c7a65422789fdacec52f957313b752a510c1
@@@ -8,16 -8,16 +8,16 @@@ import edu.wpi.first.wpilibj.Encoder
  import edu.wpi.first.wpilibj.command.Subsystem;
  
  public class DriveTrain extends Subsystem {
 -  // Drivetrain Related Objects
 -  private CANTalon frontLeft, frontRight, rearLeft, rearRight;
 +  // Drivetrain related objects
    private Encoder leftEncoder, rightEncoder;
 +  private CANTalon frontLeft, frontRight, rearLeft, rearRight;
  
 -  // Drivetrain Specific Constants that relate to the Inches per Pulse value of
 +  // Drivetrain specific constants that relate to the inches per pulse value for
    // the encoders
    private final static double WHEEL_DIAMETER = 6.0; // in inches
-   private final static double PULSES_PER_ROTATION = 256;
-   private final static double OUTPUT_SPROCKET_DIAMETER = 2.0;
-   private final static double WHEEL_SPROCKET_DIAMETER = 3.5;
+   private final static double PULSES_PER_ROTATION = 256; // in pulses
+   private final static double OUTPUT_SPROCKET_DIAMETER = 2.0; // in inches
+   private final static double WHEEL_SPROCKET_DIAMETER = 3.5; // in inches
  
    public final static double INCHES_PER_PULSE = (((Math.PI)
        * OUTPUT_SPROCKET_DIAMETER / PULSES_PER_ROTATION) / WHEEL_SPROCKET_DIAMETER)
      rightEncoder.reset();
    }
  
-   // Returns inches per second
    public double getRightSpeed() {
-     return rightEncoder.getRate();
+     return rightEncoder.getRate(); // in inches per second
    }
  
    public double getLeftSpeed() {
-     return leftEncoder.getRate();
+     return leftEncoder.getRate(); // in inches per second
    }
  
    public double getSpeed() {
-     return (getLeftSpeed() + getRightSpeed()) / 2.0;
+     return (getLeftSpeed() + getRightSpeed()) / 2.0; // in inches per second
    }
  
-   // Returns distance in in
    public double getRightDistance() {
-     return rightEncoder.getDistance();
+     return rightEncoder.getDistance(); // in inches
    }
  
-   // Returns distance in in
    public double getLeftDistance() {
-     return leftEncoder.getDistance();
+     return leftEncoder.getDistance(); // in inches
    }
  
    public double getDistance() {
-     return (getRightDistance() + getLeftDistance()) / 2.0;
+     return (getRightDistance() + getLeftDistance()) / 2.0; // in inches
    }
  
    public void stop() {
@@@ -78,8 -75,8 +75,8 @@@
    }
  
    public void setMotorSpeeds(double leftSpeed, double rightSpeed) {
 -    // Right motors receive negative values because they turn in the opposite
 -    // direction
 +    // speed passed to right motor is negative because right motor rotates in
 +    // opposite direction
      this.frontLeft.set(leftSpeed);
      this.frontRight.set(-rightSpeed);
      this.rearLeft.set(leftSpeed);