summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/usfirst/frc/team4272/robot2016/Teleop.java2
-rw-r--r--src/org/usfirst/frc/team4272/robotlib/PIDController.java7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2016/Teleop.java b/src/org/usfirst/frc/team4272/robot2016/Teleop.java
index aadbc58..6794a81 100644
--- a/src/org/usfirst/frc/team4272/robot2016/Teleop.java
+++ b/src/org/usfirst/frc/team4272/robot2016/Teleop.java
@@ -1,8 +1,6 @@
package org.usfirst.frc.team4272.robot2016;
-import org.usfirst.frc.team4272.robotlib.ToggleButton;
import org.usfirst.frc.team4272.robotlib.PushButton;
-import org.usfirst.frc.team4272.robotlib.Xbox360Controller.Axis;
import org.usfirst.frc.team4272.robotlib.Xbox360Controller.Button;
import edu.wpi.first.wpilibj.Joystick;
diff --git a/src/org/usfirst/frc/team4272/robotlib/PIDController.java b/src/org/usfirst/frc/team4272/robotlib/PIDController.java
index 0fd53d9..965851d 100644
--- a/src/org/usfirst/frc/team4272/robotlib/PIDController.java
+++ b/src/org/usfirst/frc/team4272/robotlib/PIDController.java
@@ -46,6 +46,9 @@ public class PIDController extends edu.wpi.first.wpilibj.PIDController implement
private boolean enabled = true;
public final PIDSource source;
public final PIDOutput output;
+
+ /* Mimic the four PIDController constructors *******************/
+
public PIDController(double Kp, double Ki, double Kd, PIDSource source, PIDOutput output) {
super(Kp, Ki, Kd, source, output);
this.source = source;
@@ -72,6 +75,8 @@ public class PIDController extends edu.wpi.first.wpilibj.PIDController implement
this.output = output;
}
+ /* Mimic the four PIDController constructors *******************/
+
public void setSetpoint(double output) {
if ((output == 0) && autodisable) {
disable();
@@ -85,10 +90,12 @@ public class PIDController extends edu.wpi.first.wpilibj.PIDController implement
}
}
+ /* Implement PIDOutput (a parent of SpeedController) */
public void pidWrite(double output) {
setSetpoint(output);
}
+ /* Implement SpeedController */
public void set(double output) {
setSetpoint(output);
}