From 0e7c82c6173c0d230c1a921150d691bd8ebfde7d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 16 Jan 2016 12:56:01 -0500 Subject: trailing whitespace cleanup --- src/org/mckenzierobotics/lib/robot/CommandBase.java | 16 ++++++++-------- src/org/mckenzierobotics/lib/robot/CommandRobot.java | 12 ++++++------ src/org/mckenzierobotics/lib/robot/FeedForward.java | 14 +++++++------- src/org/mckenzierobotics/lib/robot/PIDController.java | 18 +++++++++--------- .../mckenzierobotics/lib/robot/PIDOutputSplitter.java | 12 ++++++------ src/org/mckenzierobotics/lib/robot/PIDServo.java | 2 +- .../lib/robot/RateLimitedPIDOutput.java | 8 ++++---- src/org/mckenzierobotics/lib/robot/RollingAvg.java | 8 ++++---- .../mckenzierobotics/lib/robot/SendablePIDOutput.java | 8 ++++---- 9 files changed, 49 insertions(+), 49 deletions(-) (limited to 'src/org/mckenzierobotics/lib/robot') diff --git a/src/org/mckenzierobotics/lib/robot/CommandBase.java b/src/org/mckenzierobotics/lib/robot/CommandBase.java index 0e70893..a0fb5a2 100644 --- a/src/org/mckenzierobotics/lib/robot/CommandBase.java +++ b/src/org/mckenzierobotics/lib/robot/CommandBase.java @@ -1,18 +1,18 @@ /** * CommandBase - defines robot hardware; superclass of all commands. - * + * * Copyright (c) FIRST 2008. All Rights Reserved. * Open Source Software - may be modified and shared by FRC teams. The code * must be accompanied by the FIRST BSD license file in the root directory of * the project. - * + * * Copyright (c) 2012 Precise Path Robotics, Inc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * @author Luke Shumaker */ package org.mckenzierobotics.lib.robot; @@ -33,7 +33,7 @@ import edu.wpi.first.wpilibj.command.Subsystem; * The base for all commands, also the class defining robot hardware/config. * All atomic commands should subclass CommandBase. CommandBase stores creates * and stores each control system. - * + * * @author Luke Shumaker */ public abstract class CommandBase extends Command { @@ -45,14 +45,14 @@ public abstract class CommandBase extends Command { } super.requires(subsystem); } - + public synchronized void start() { if (has_subsystems) { super.start(); } } /** * Instantiate a CANJaguar, handling exceptions. - * + * * @param id CANJaguar ID to use. * @return the CANJaguar */ @@ -65,7 +65,7 @@ public abstract class CommandBase extends Command { } return ret; } - + public CommandBase() { super(); } public CommandBase(double timeout) { super(timeout); } public CommandBase(String name) { super(name); } diff --git a/src/org/mckenzierobotics/lib/robot/CommandRobot.java b/src/org/mckenzierobotics/lib/robot/CommandRobot.java index 35534c2..ecbd879 100644 --- a/src/org/mckenzierobotics/lib/robot/CommandRobot.java +++ b/src/org/mckenzierobotics/lib/robot/CommandRobot.java @@ -1,13 +1,13 @@ /** * CommandFramework base class for FRC 1024. - * + * * Copyright (c) 2012 Precise Path Robotics, Inc * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * @author Luke Shumaker */ @@ -31,14 +31,14 @@ import edu.wpi.first.wpilibj.command.Scheduler; * documentation. If you change the name of this class or the package after * creating this project, you must also update the manifest file in the resource * directory. - * + * * @author Luke Shumaker */ public abstract class CommandRobot extends IterativeRobot { protected Command autonomousCommand; protected Command teleopCommand; - + public abstract void robotInit(); public void autonomousInit() { @@ -57,7 +57,7 @@ public abstract class CommandRobot extends IterativeRobot { public void teleopPeriodic() { Scheduler.getInstance().run(); } - + public void disabledInit() { autonomousCommand.cancel(); teleopCommand.cancel(); diff --git a/src/org/mckenzierobotics/lib/robot/FeedForward.java b/src/org/mckenzierobotics/lib/robot/FeedForward.java index a18dccc..c7a06b8 100644 --- a/src/org/mckenzierobotics/lib/robot/FeedForward.java +++ b/src/org/mckenzierobotics/lib/robot/FeedForward.java @@ -5,7 +5,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * @author Luke Shumaker */ package org.mckenzierobotics.lib.robot; @@ -45,7 +45,7 @@ public abstract class FeedForward implements PIDOutput { pidOutput = output; pid = new PIDController(Kp, Ki, Kd, source, new PIDTrigger(this), period); } - + public FeedForward(double Kp, double Ki, double Kd, PIDSource source, PIDOutput output, boolean autodisable) { pidOutput = output; pid = new PIDController(Kp, Ki, Kd, source, new PIDTrigger(this), autodisable); @@ -54,15 +54,15 @@ public abstract class FeedForward implements PIDOutput { pidOutput = output; pid = new PIDController(Kp, Ki, Kd, source, new PIDTrigger(this), period, autodisable); } - + public PIDController getPID() { return pid; } - + public void pidWrite(double output) { pid.setSetpoint(output); } - + public void update(double pidResult) { if (pid.isEnabled()) { double ffResult = calculate(pid.getSetpoint()); @@ -71,6 +71,6 @@ public abstract class FeedForward implements PIDOutput { pidOutput.pidWrite(0); } } - + public abstract double calculate(double setpoint); } diff --git a/src/org/mckenzierobotics/lib/robot/PIDController.java b/src/org/mckenzierobotics/lib/robot/PIDController.java index e2f8087..b0cf99f 100644 --- a/src/org/mckenzierobotics/lib/robot/PIDController.java +++ b/src/org/mckenzierobotics/lib/robot/PIDController.java @@ -15,15 +15,15 @@ * * THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR + * WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * @author Luke Shumaker */ package org.mckenzierobotics.lib.robot; @@ -56,7 +56,7 @@ public class PIDController extends edu.wpi.first.wpilibj.PIDController implement this.source = source; this.output = output; } - + public PIDController(double Kp, double Ki, double Kd, PIDSource source, PIDOutput output, boolean autodisable) { super(Kp, Ki, Kd, source, output); this.autodisable = autodisable; @@ -71,7 +71,7 @@ public class PIDController extends edu.wpi.first.wpilibj.PIDController implement this.source = source; this.output = output; } - + public void setSetpoint(double output) { if ((output == 0) && autodisable) { disable(); @@ -84,19 +84,19 @@ public class PIDController extends edu.wpi.first.wpilibj.PIDController implement super.setSetpoint(output); } } - + public void pidWrite(double output) { setSetpoint(output); } - + public void set(double output) { setSetpoint(output); } - + /** * Don't use this; it is leaking up from CANJaguar * @param output - * @param syncGroup + * @param syncGroup */ public void set(double output, byte syncGroup) { setSetpoint(output); diff --git a/src/org/mckenzierobotics/lib/robot/PIDOutputSplitter.java b/src/org/mckenzierobotics/lib/robot/PIDOutputSplitter.java index b4e7713..c689bab 100644 --- a/src/org/mckenzierobotics/lib/robot/PIDOutputSplitter.java +++ b/src/org/mckenzierobotics/lib/robot/PIDOutputSplitter.java @@ -15,15 +15,15 @@ * * THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR + * WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * @author Luke Shumaker */ @@ -65,13 +65,13 @@ public class PIDOutputSplitter implements PIDOutput { } } } - + /** * Handles exceptions from pidWrite(). - * + * * By default it writes to System.out; you may extend+override this to * change the behavior. - * + * * @param e Exception */ public void error(Exception e) { diff --git a/src/org/mckenzierobotics/lib/robot/PIDServo.java b/src/org/mckenzierobotics/lib/robot/PIDServo.java index fdbd1ce..9d038d1 100644 --- a/src/org/mckenzierobotics/lib/robot/PIDServo.java +++ b/src/org/mckenzierobotics/lib/robot/PIDServo.java @@ -29,7 +29,7 @@ public class PIDServo extends Servo implements PIDOutput { public PIDServo(int channel) { super(channel); } - + public void pidWrite(double degrees) { setAngle(getAngle()+degrees); } diff --git a/src/org/mckenzierobotics/lib/robot/RateLimitedPIDOutput.java b/src/org/mckenzierobotics/lib/robot/RateLimitedPIDOutput.java index ed36345..10f01ce 100644 --- a/src/org/mckenzierobotics/lib/robot/RateLimitedPIDOutput.java +++ b/src/org/mckenzierobotics/lib/robot/RateLimitedPIDOutput.java @@ -5,7 +5,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * @author Luke Shumaker */ @@ -31,12 +31,12 @@ public class RateLimitedPIDOutput implements PIDOutput { double m; double prev_rate = 0; double prev_time = 0; - + public RateLimitedPIDOutput(PIDOutput out, double maxChange) { o = out; m = maxChange; } - + public void pidWrite(double rate) { double time = Timer.getFPGATimestamp(); double dTime = time-prev_time; diff --git a/src/org/mckenzierobotics/lib/robot/RollingAvg.java b/src/org/mckenzierobotics/lib/robot/RollingAvg.java index d73f64e..3001b8a 100644 --- a/src/org/mckenzierobotics/lib/robot/RollingAvg.java +++ b/src/org/mckenzierobotics/lib/robot/RollingAvg.java @@ -15,15 +15,15 @@ * * THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR + * WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * @author Luke Shumaker */ @@ -71,7 +71,7 @@ public class RollingAvg implements PIDSource, PIDOutput { else return get(); } - + public void pidWrite(double output) { push(output); } diff --git a/src/org/mckenzierobotics/lib/robot/SendablePIDOutput.java b/src/org/mckenzierobotics/lib/robot/SendablePIDOutput.java index 43852b1..679c6e1 100644 --- a/src/org/mckenzierobotics/lib/robot/SendablePIDOutput.java +++ b/src/org/mckenzierobotics/lib/robot/SendablePIDOutput.java @@ -5,7 +5,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * * @author Luke Shumaker */ @@ -29,12 +29,12 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class SendablePIDOutput implements PIDOutput { PIDOutput o; String n; - + public SendablePIDOutput(String name, PIDOutput out) { n = name; o = out; } - + public void pidWrite(double val) { o.pidWrite(val); SmartDashboard.putNumber(n, val); -- cgit v1.2.3-54-g00ecf