package org.robockets.stronghold.robot;


import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.PIDSource;
import edu.wpi.first.wpilibj.PIDSourceType;

public class EncoderPIDSource implements PIDSource {

	Encoder encoder;
	double factor;
	PIDSourceType sourceType;
	
	public EncoderPIDSource(Encoder jack, double factor){
		encoder = jack;
		this.factor = factor;
	}
	
	@Override
	public void setPIDSourceType(PIDSourceType pidSource) {
		this.sourceType = pidSource;
	}

	@Override
	public PIDSourceType getPIDSourceType() {
		// Currently ignoring
		return sourceType;
	}

	@Override
	public double pidGet() {
		return encoder.getDistance()*factor;
	}

}

@@ -327,16 +327,36 @@
 e factor
+, PIDSourceType type
 )%7B%0A%09%09enc
@@ -392,16 +392,37 @@
 factor;%0A
+%09%09sourceType = type;%0A
 %09%7D%0A%09%0A%09@O
@@ -695,9 +695,11 @@
 ce()
-*
+ * 
 fact

Add new constructor to EncoderPIDSource to set PIDSourceType.