Skip to content

Commit

Permalink
Merge pull request #110 from blair-robot-project/cleanup
Browse files Browse the repository at this point in the history
Make as much final as possible
  • Loading branch information
Noah Gleason authored Nov 5, 2017
2 parents 6adbf50 + 094ecaf commit 5db739a
Show file tree
Hide file tree
Showing 314 changed files with 332 additions and 334 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public class DriveUnidirectionalSimple extends YamlSubsystem implements DriveUni
* The motor for the left side of the drive.
*/
@NotNull
private SimpleMotor leftMotor;
private final SimpleMotor leftMotor;

/**
* The motor for the right side of the drive.
*/
@NotNull
private SimpleMotor rightMotor;
private final SimpleMotor rightMotor;

/**
* Default constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ public class DetermineNominalVoltage<T extends YamlSubsystem & DriveUnidirection
*/
@NotNull
private final T subsystem;

/**
* The current percent of max output commanded, on [0, 1].
* The minimum speed, in RPS, at which the drive is considered to be moving.
*/
private double percentCommanded;

private final double minSpeed;
/**
* The minimum speed, in RPS, at which the drive is considered to be moving.
* The current percent of max output commanded, on [0, 1].
*/
private double minSpeed;
private double percentCommanded;

/**
* Default constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ protected void execute() {
subsystem.setOutput(oi.getLeftOutputCached(), oi.getLeftOutputCached());
} else {
subsystem.setOutput(oi.getRightOutputCached(), oi.getRightOutputCached());
;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface Shiftable {
enum gear {
LOW(1), HIGH(2);

private int numVal;
private final int numVal;

gear(int numVal) {
this.numVal = numVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,28 @@ public class OIFieldOrientedPosCos extends OIFieldOriented {
*/
@NotNull
private final Throttle yThrottle;

/**
* The radius, from [0,1], within which the joystick is considered to be "at rest."
*/
private final double rDeadband;
/**
* The theta value calculated the last time calcValues was called.
*/
@Nullable
private Double theta;

/**
* The velocity value calculated the last time calcValues was called.
*/
private double vel;

/**
* The time calcValues was last called, in milliseconds
*/
private long timeLastUpdated;

/**
* Variables for the outputs of the x and y throttles. Fields to avoid garbage collection.
*/
private double x, y;

/**
* The radius, from [0,1], within which the joystick is considered to be "at rest."
*/
private double rDeadband;

/**
* Default constructor
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class BinaryMotorSimple extends YamlSubsystem implements SubsystemBinaryM
* The motor that this subsystem controls.
*/
@NotNull
private SimpleMotor motor;
private final SimpleMotor motor;

/**
* The velocity to run the motor at, on [-1, 1].
*/
private double velocity;
private final double velocity;

/**
* Whether or not the motor is currently on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ public class FlywheelSimple extends YamlSubsystem implements SubsystemFlywheel {
* The motor that controls the flywheel.
*/
@NotNull
private SimpleMotor shooterMotor;
private final SimpleMotor shooterMotor;

/**
* The motor that controls the feeder.
*/
@NotNull
private SimpleMotor feederMotor;
private final SimpleMotor feederMotor;

/**
* The velocity for the flywheel to run at, on [-1, 1].
*/
private double shooterVelocity;
private final double shooterVelocity;

/**
* The velocity for the feeder to run at, on [-1, 1].
*/
private double feederVelocity;
private final double feederVelocity;

/**
* Time from giving the flywheel voltage to being ready to fire, in milliseconds.
*/
private long spinUpTimeMillis;
private final long spinUpTimeMillis;

/**
* The current state of the flywheel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ public class IntakeSimple extends YamlSubsystem implements SubsystemIntake {
* The motor this subsystem controls.
*/
@NotNull
private SimpleMotor motor;
private final SimpleMotor motor;

/**
* The velocities for the motor to go at for each of the modes, on [-1, 1]. Can be null to indicate that this intake
* doesn't have/use that mode.
*/
@Nullable
private Double inSlowVel, inFastVel, outSlowVel, outFastVel;
private final Double inSlowVel;
@Nullable
private final Double inFastVel;
@Nullable
private final Double outSlowVel;
@Nullable
private final Double outFastVel;

/**
* The current mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ChangeCam extends YamlCommandWrapper {
* The subsystem to execute this command on
*/
@NotNull
private CameraNetwork subsystem;
private final CameraNetwork subsystem;

/**
* Default constructor.
Expand Down
2 changes: 1 addition & 1 deletion docs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:50 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:56 EST 2017 -->
<title>All Classes (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:51 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:56 EST 2017 -->
<title>All Classes (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:50 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:55 EST 2017 -->
<title>Constant Field Values (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:50 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:56 EST 2017 -->
<title>Deprecated List (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:51 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:56 EST 2017 -->
<title>API Help (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:50 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:55 EST 2017 -->
<title>Index (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:51 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:56 EST 2017 -->
<title>RoboRIO 1.0 API</title>
<script type="text/javascript">
tmpTargetPage = "" + window.location.search;
Expand Down
2 changes: 1 addition & 1 deletion docs/org/usfirst/frc/team449/robot/Robot.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:33 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:38 EST 2017 -->
<title>Robot (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
Expand Down
2 changes: 1 addition & 1 deletion docs/org/usfirst/frc/team449/robot/RobotMap2017.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:33 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:38 EST 2017 -->
<title>RobotMap2017 (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:33 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:38 EST 2017 -->
<title>Auto2017Boiler (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:34 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:38 EST 2017 -->
<title>Auto2017Center (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:34 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:38 EST 2017 -->
<title>Auto2017Feeder (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:39 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:44 EST 2017 -->
<title>org.usfirst.frc.team449.robot.commands.autonomous (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:39 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:44 EST 2017 -->
<title>org.usfirst.frc.team449.robot.commands.autonomous (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:39 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:44 EST 2017 -->
<title>org.usfirst.frc.team449.robot.commands.autonomous Class Hierarchy (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:32 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:36 EST 2017 -->
<title>CommandSequence (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:32 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:36 EST 2017 -->
<title>ParallelCommandGroup (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:32 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:37 EST 2017 -->
<title>RunRunnables (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:32 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:37 EST 2017 -->
<title>WaitForMillis (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:39 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:44 EST 2017 -->
<title>org.usfirst.frc.team449.robot.commands.general (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:39 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:44 EST 2017 -->
<title>org.usfirst.frc.team449.robot.commands.general (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:39 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:44 EST 2017 -->
<title>org.usfirst.frc.team449.robot.commands.general Class Hierarchy (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:31 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:36 EST 2017 -->
<title>RunMotorWhileConditonMet (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:37 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:42 EST 2017 -->
<title>FieldOrientedUnidirectionalDriveCommand.AngularSnapPoint (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 13:49:37 EST 2017 -->
<!-- Generated by javadoc (1.8.0_121) on Sun Nov 05 14:22:42 EST 2017 -->
<title>FieldOrientedUnidirectionalDriveCommand (RoboRIO 1.0 API)</title>
<meta name="date" content="2017-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
Expand Down
Loading

0 comments on commit 5db739a

Please sign in to comment.