From 55e57d8bb2a5524525258870d2a04f1f877303ef Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 16 Jan 2016 15:16:07 -0500 Subject: wip --- src/org/usfirst/frc/team4272/robot2016/Teleop.java | 2 -- src/org/usfirst/frc/team4272/robotlib/PIDController.java | 7 +++++++ 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); } -- cgit v1.2.3-54-g00ecf