package org.robockets.distancesensorlib;

import edu.wpi.first.wpilibj.AnalogInput;

/**
 * Represents a distance sensor. Extend this if you are making a class for a
 * new distance sensor
 */
public abstract class DistanceSensor {
	protected AnalogInput sensor;
	
	/**
	 * If you try to make an instance of DistanceSensor anywhere, Eclipse will
	 * tell you to change the visibility of this constructor to public. DO NOT
	 * DO THIS. Use a subclass of this class instead.
	 *
	 * @param sensor The AnalogInput object that is configured to the port the
	 *               sensor is on
	 */
	public DistanceSensor(AnalogInput sensor) {
		this.sensor = sensor;
	}
	
	/**
	 * @return {@link edu.wpi.first.wpilibj.AnalogInput AnalogInput} instance
	 * for the distance sensor.
	 */
	protected AnalogInput getAnalogInput() {
		return this.sensor;
	}
	
	/**
	 * @return Distance in centimeters the sensor is from the closest object it
	 * can detect
	 */
	public abstract double getDistanceCentimeters();
	
	/**
	 * @return Distance in inches the sensor is from the closest object it
	 * can detect
	 */
	public abstract double getDistanceInches();
}
@@ -228,32 +228,38 @@
 or %7B%0A%09protected 
+final 
 AnalogInput sens
@@ -778,24 +778,21 @@
 %0A%09 */%0A%09p
-rotected
+ublic
  AnalogI
@@ -828,25 +828,282 @@
 urn 
-this.
 sensor
+;%0A%09%7D%0A%0A%09/**%0A%09 * @return Double that represents the current raw voltage the distance%0A%09 * sensor is putting out, with no fancy filters to convert it into a%0A%09 * human-friendly distance measurement.%0A     */%0A%09public double getRawVoltage() %7B%0A%09%09return sensor.getVoltage()
 ;%0A%09%7D%0A
-%09
 %0A%09/*

Add getRawVoltage() method