summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-01-16 15:16:07 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-01-16 15:16:07 -0500
commit55e57d8bb2a5524525258870d2a04f1f877303ef (patch)
treec112df5f4f9c358a3fb578efa038386c8a155608 /src
parentac238618d3e54bfe11e55817169756f8b3850cf6 (diff)
wip
Diffstat (limited to 'src')
-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);
}