From 92149efa11fab5ca519e1afa897d08de796d9e1e Mon Sep 17 00:00:00 2001 From: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com> Date: Mon, 26 Dec 2022 14:32:13 -0500 Subject: [PATCH] Spelling and grammar cleanups (#4849) --- .../first/apriltag/AprilTagFieldLayout.java | 8 +-- .../wpi/first/wpilibj2/command/Command.java | 8 +-- .../command/MecanumControllerCommand.java | 4 +- .../command/ProxyScheduleCommand.java | 2 +- .../first/wpilibj2/command/SelectCommand.java | 4 +- .../wpi/first/wpilibj2/command/Subsystem.java | 2 +- .../command/SwerveControllerCommand.java | 9 +-- .../first/wpilibj2/command/button/Button.java | 6 +- .../command/button/CommandGenericHID.java | 36 +++++------ .../command/button/InternalButton.java | 2 +- .../native/include/frc2/command/Command.h | 2 +- .../native/include/frc2/command/CommandPtr.h | 2 +- .../frc2/command/MecanumControllerCommand.h | 8 +-- .../frc2/command/ParallelCommandGroup.h | 2 +- .../include/frc2/command/SelectCommand.h | 2 +- .../include/frc2/command/button/Button.h | 2 +- .../frc2/command/button/CommandGenericHID.h | 32 +++++----- .../frc2/command/button/JoystickButton.h | 2 +- .../src/main/native/include/frc/GenericHID.h | 32 +++++----- .../edu/wpi/first/wpilibj/ADIS16448_IMU.java | 12 ++-- .../edu/wpi/first/wpilibj/ADIS16470_IMU.java | 8 +-- .../edu/wpi/first/wpilibj/AddressableLED.java | 4 +- .../edu/wpi/first/wpilibj/AnalogEncoder.java | 6 +- .../edu/wpi/first/wpilibj/AnalogInput.java | 4 +- .../first/wpilibj/AnalogPotentiometer.java | 12 ++-- .../first/wpilibj/AnalogTriggerOutput.java | 4 +- .../main/java/edu/wpi/first/wpilibj/CAN.java | 4 +- .../java/edu/wpi/first/wpilibj/Counter.java | 4 +- .../edu/wpi/first/wpilibj/CounterBase.java | 6 +- .../first/wpilibj/DigitalGlitchFilter.java | 2 +- .../edu/wpi/first/wpilibj/DigitalOutput.java | 2 +- .../edu/wpi/first/wpilibj/DriverStation.java | 2 +- .../wpi/first/wpilibj/DutyCycleEncoder.java | 6 +- .../java/edu/wpi/first/wpilibj/Encoder.java | 60 +++++++++---------- .../edu/wpi/first/wpilibj/Filesystem.java | 9 ++- .../edu/wpi/first/wpilibj/GenericHID.java | 42 ++++++------- .../main/java/edu/wpi/first/wpilibj/PWM.java | 2 +- .../edu/wpi/first/wpilibj/Preferences.java | 2 +- .../java/edu/wpi/first/wpilibj/Relay.java | 2 +- .../java/edu/wpi/first/wpilibj/Resource.java | 10 ++-- .../java/edu/wpi/first/wpilibj/RobotBase.java | 4 +- .../main/java/edu/wpi/first/wpilibj/SPI.java | 6 +- .../edu/wpi/first/wpilibj/SerialPort.java | 12 ++-- .../first/wpilibj/SynchronousInterrupt.java | 6 +- .../edu/wpi/first/wpilibj/Ultrasonic.java | 16 ++--- .../counter/ExternalDirectionCounter.java | 2 +- .../wpi/first/wpilibj/drive/MecanumDrive.java | 12 ++-- .../wpilibj/interfaces/Accelerometer.java | 8 +-- .../wpi/first/wpilibj/interfaces/Gyro.java | 2 +- .../first/wpilibj/livewindow/LiveWindow.java | 2 +- .../java/edu/wpi/first/wpilibj/package.html | 2 +- .../wpilibj/shuffleboard/BuiltInWidgets.java | 2 +- .../wpi/first/wpilibj/simulation/DIOSim.java | 2 +- .../wpilibj/simulation/GenericHIDSim.java | 2 +- .../wpilibj/simulation/PS4ControllerSim.java | 2 +- .../wpilibj/smartdashboard/FieldObject2d.java | 4 +- .../smartdashboard/SendableBuilderImpl.java | 2 +- .../smartdashboard/SendableChooser.java | 2 +- .../smartdashboard/SmartDashboard.java | 2 +- .../simulation/DriverStationSimTest.java | 2 +- .../wpilibj/simulation/RelaySimTest.java | 2 +- .../main/java/edu/wpi/first/math/Drake.java | 8 +-- .../main/java/edu/wpi/first/math/Matrix.java | 11 ++-- .../edu/wpi/first/math/SimpleMatrixUtils.java | 4 +- .../java/edu/wpi/first/math/WPIMathJNI.java | 2 +- .../first/math/controller/PIDController.java | 2 +- .../controller/ProfiledPIDController.java | 2 +- .../DifferentialDrivePoseEstimator.java | 2 +- .../math/estimator/ExtendedKalmanFilter.java | 4 +- .../first/math/estimator/KalmanFilter.java | 2 +- .../KalmanFilterLatencyCompensator.java | 4 +- .../estimator/MecanumDrivePoseEstimator.java | 6 +- .../estimator/MerweScaledSigmaPoints.java | 2 +- .../estimator/SwerveDrivePoseEstimator.java | 6 +- .../math/estimator/UnscentedKalmanFilter.java | 2 +- .../wpi/first/math/filter/LinearFilter.java | 2 +- .../edu/wpi/first/math/geometry/Pose2d.java | 4 +- .../edu/wpi/first/math/geometry/Pose3d.java | 4 +- .../edu/wpi/first/math/geometry/Twist2d.java | 2 +- .../edu/wpi/first/math/geometry/Twist3d.java | 2 +- .../kinematics/MecanumDriveKinematics.java | 4 +- .../kinematics/SwerveDriveKinematics.java | 11 ++-- .../edu/wpi/first/math/spline/Spline.java | 2 +- .../first/math/system/LinearSystemLoop.java | 2 +- .../DifferentialDriveVoltageConstraint.java | 2 +- .../kinematics/MecanumDriveOdometryTest.java | 2 +- .../kinematics/SwerveDriveKinematicsTest.java | 4 +- .../kinematics/SwerveDriveOdometryTest.java | 2 +- .../edu/wpi/first/util/RuntimeLoader.java | 16 ++--- .../java/edu/wpi/first/util/WPIUtilJNI.java | 4 +- .../wpi/first/util/concurrent/Semaphore.java | 2 +- .../util/datalog/BooleanArrayLogEntry.java | 2 +- .../first/util/datalog/BooleanLogEntry.java | 2 +- .../edu/wpi/first/util/datalog/DataLog.java | 8 +-- .../wpi/first/util/datalog/DataLogEntry.java | 4 +- .../wpi/first/util/datalog/DataLogReader.java | 2 +- .../util/datalog/DoubleArrayLogEntry.java | 2 +- .../first/util/datalog/DoubleLogEntry.java | 2 +- .../util/datalog/FloatArrayLogEntry.java | 2 +- .../wpi/first/util/datalog/FloatLogEntry.java | 2 +- .../util/datalog/IntegerArrayLogEntry.java | 2 +- .../first/util/datalog/IntegerLogEntry.java | 2 +- .../wpi/first/util/datalog/RawLogEntry.java | 2 +- .../util/datalog/StringArrayLogEntry.java | 2 +- .../first/util/datalog/StringLogEntry.java | 2 +- .../first/util/function/BooleanConsumer.java | 2 +- .../first/util/function/FloatConsumer.java | 2 +- .../first/util/sendable/SendableBuilder.java | 2 +- .../src/main/native/include/wpi/Algorithm.h | 2 +- .../first/util/InterpolatingTreeMapTest.java | 8 +-- 110 files changed, 317 insertions(+), 319 deletions(-) diff --git a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java index 6921b0b75c..605c97cca7 100644 --- a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java +++ b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java @@ -114,8 +114,8 @@ public class AprilTagFieldLayout { * Sets the origin based on a predefined enumeration of coordinate frame origins. The origins are * calculated from the field dimensions. * - *

This transforms the Pose3ds returned by {@link #getTagPose(int)} to return the correct pose - * relative to a predefined coordinate frame. + *

This transforms the Pose3d objects returned by {@link #getTagPose(int)} to return the + * correct pose relative to a predefined coordinate frame. * * @param origin The predefined origin */ @@ -139,8 +139,8 @@ public class AprilTagFieldLayout { /** * Sets the origin for tag pose transformation. * - *

This transforms the Pose3ds returned by {@link #getTagPose(int)} to return the correct pose - * relative to the provided origin. + *

This transforms the Pose3d objects returned by {@link #getTagPose(int)} to return the + * correct pose relative to the provided origin. * * @param origin The new origin for tag transformations */ diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java index 11241794cc..0383099495 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java @@ -13,7 +13,7 @@ import java.util.function.BooleanSupplier; /** * A state machine representing a complete action to be performed by the robot. Commands are run by * the {@link CommandScheduler}, and can be composed into CommandGroups to allow users to build - * complicated multi-step actions without the need to roll the state machine logic themselves. + * complicated multistep actions without the need to roll the state machine logic themselves. * *

Commands are run synchronously from the main robot loop; no multithreading is used, unless * specified explicitly from the command implementation. @@ -299,7 +299,7 @@ public interface Command { /** * Decorates this command to only run if this condition is not met. If the command is already * running and the condition changes to true, the command will not stop running. The requirements - * of this command will be kept for the new conditonal command. + * of this command will be kept for the new conditional command. * * @param condition the condition that will prevent the command from running * @return the decorated command @@ -390,8 +390,8 @@ public interface Command { } /** - * Whether or not the command is currently scheduled. Note that this does not detect whether the - * command is in a composition, only whether it is directly being run by the scheduler. + * Whether the command is currently scheduled. Note that this does not detect whether the command + * is in a composition, only whether it is directly being run by the scheduler. * * @return Whether the command is scheduled. */ diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/MecanumControllerCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/MecanumControllerCommand.java index 9b023cecce..76d3cb1984 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/MecanumControllerCommand.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/MecanumControllerCommand.java @@ -218,7 +218,7 @@ public class MecanumControllerCommand extends CommandBase { * trajectory. The user should implement a velocity PID on the desired output wheel velocities. * *

Note: The controllers will *not* set the outputVolts to zero upon completion of the path - - * this is left to the user, since it is not appropriate for paths with non-stationary end-states. + * this is left to the user, since it is not appropriate for paths with nonstationary end-states. * * @param trajectory The trajectory to follow. * @param pose A function that supplies the robot pose - use one of the odometry classes to @@ -286,7 +286,7 @@ public class MecanumControllerCommand extends CommandBase { * trajectory. The user should implement a velocity PID on the desired output wheel velocities. * *

Note: The controllers will *not* set the outputVolts to zero upon completion of the path - - * this is left to the user, since it is not appropriate for paths with non-stationary end-states. + * this is left to the user, since it is not appropriate for paths with nonstationary end-states. * *

Note 2: The final rotation of the robot will be set to the rotation of the final pose in the * trajectory. The robot will not follow the rotations from the poses at each timestep. If diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyScheduleCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyScheduleCommand.java index 9ef82923a0..eec1b1809a 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyScheduleCommand.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/ProxyScheduleCommand.java @@ -9,7 +9,7 @@ import java.util.Set; /** * Schedules the given commands when this command is initialized, and ends when all the commands are * no longer scheduled. Useful for forking off from CommandGroups. If this command is interrupted, - * it will cancel all of the commands. + * it will cancel all the commands. * *

This class is provided by the NewCommands VendorDep */ diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SelectCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SelectCommand.java index 5305115197..30ad7862f9 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SelectCommand.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SelectCommand.java @@ -29,7 +29,7 @@ public class SelectCommand extends CommandBase { private InterruptionBehavior m_interruptBehavior = InterruptionBehavior.kCancelIncoming; /** - * Creates a new selectcommand. + * Creates a new SelectCommand. * * @param commands the map of commands to choose from * @param selector the selector to determine which command to run @@ -53,7 +53,7 @@ public class SelectCommand extends CommandBase { } /** - * Creates a new selectcommand. + * Creates a new SelectCommand. * * @param toRun a supplier providing the command to run * @deprecated Replace with {@link ProxyCommand} diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Subsystem.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Subsystem.java index f8457b10c7..0584ced2b2 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Subsystem.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Subsystem.java @@ -6,7 +6,7 @@ package edu.wpi.first.wpilibj2.command; /** * A robot subsystem. Subsystems are the basic unit of robot organization in the Command-based - * framework; they encapsulate low-level hardware objects (motor controllers, sensors, etc) and + * framework; they encapsulate low-level hardware objects (motor controllers, sensors, etc.) and * provide methods through which they can be used by {@link Command}s. Subsystems are used by the * {@link CommandScheduler}'s resource management system to ensure multiple robot actions are not * "fighting" over the same hardware; Commands that use a subsystem should include that subsystem in diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SwerveControllerCommand.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SwerveControllerCommand.java index 1db7dd4383..850699e251 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SwerveControllerCommand.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/SwerveControllerCommand.java @@ -45,8 +45,9 @@ public class SwerveControllerCommand extends CommandBase { * trajectory. This command will not return output voltages but rather raw module states from the * position controllers which need to be put into a velocity PID. * - *

Note: The controllers will *not* set the outputVolts to zero upon completion of the path- - * this is left to the user, since it is not appropriate for paths with nonstationary endstates. + *

Note: The controllers will *not* set the outputVolts to zero upon completion of the path. + * This is left to the user to do since it is not appropriate for paths with nonstationary + * endstates. * * @param trajectory The trajectory to follow. * @param pose A function that supplies the robot pose - use one of the odometry classes to @@ -88,8 +89,8 @@ public class SwerveControllerCommand extends CommandBase { * trajectory. This command will not return output voltages but rather raw module states from the * position controllers which need to be put into a velocity PID. * - *

Note: The controllers will *not* set the outputVolts to zero upon completion of the path- - * this is left to the user, since it is not appropriate for paths with nonstationary endstates. + *

Note: The controllers will *not* set the outputVolts to zero upon completion of the path. + * This is left to the user since it is not appropriate for paths with nonstationary endstates. * *

Note 2: The final rotation of the robot will be set to the rotation of the final pose in the * trajectory. The robot will not follow the rotations from the poses at each timestep. If diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java index 4e748ced32..4e4e11a818 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java @@ -33,7 +33,7 @@ public class Button extends Trigger { /** * Creates a new button with the given condition determining whether it is pressed. * - * @param isPressed returns whether or not the trigger should be active + * @param isPressed returns whether the trigger should be active * @deprecated Replace with Trigger. */ @Deprecated @@ -141,8 +141,8 @@ public class Button extends Trigger { } /** - * Toggles the command whenever the button is pressed (on then off then on). The command is set to - * be interruptible. + * Toggles the command whenever the button is pressed (on, then off, then on). The command is set + * to be interruptible. * * @param command the command to start * @return this button, so calls can be chained diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/CommandGenericHID.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/CommandGenericHID.java index c393862f18..fadff92261 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/CommandGenericHID.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/CommandGenericHID.java @@ -62,7 +62,7 @@ public class CommandGenericHID { * attached to {@link CommandScheduler#getDefaultButtonLoop() the default command scheduler button * loop}. * - *

The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, + *

The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90, * upper-left is 315). * * @param angle POV angle in degrees, or -1 for the center / not pressed. @@ -75,7 +75,7 @@ public class CommandGenericHID { /** * Constructs a Trigger instance based around this angle of a POV on the HID. * - *

The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, + *

The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90, * upper-left is 315). * * @param pov index of the POV to read (starting at 0). Defaults to 0. @@ -89,88 +89,88 @@ public class CommandGenericHID { } /** - * Constructs a Trigger instance based around the 0-degree angle (up) of the default (index 0) POV + * Constructs a Trigger instance based around the 0 degree angle (up) of the default (index 0) POV * on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command * scheduler button loop}. * - * @return a Trigger instance based around the 0-degree angle of a POV on the HID. + * @return a Trigger instance based around the 0 degree angle of a POV on the HID. */ public Trigger povUp() { return pov(0); } /** - * Constructs a Trigger instance based around the 45-degree angle (right up) of the default (index + * Constructs a Trigger instance based around the 45 degree angle (right up) of the default (index * 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default * command scheduler button loop}. * - * @return a Trigger instance based around the 45-degree angle of a POV on the HID. + * @return a Trigger instance based around the 45 degree angle of a POV on the HID. */ public Trigger povUpRight() { return pov(45); } /** - * Constructs a Trigger instance based around the 90-degree angle (right) of the default (index 0) + * Constructs a Trigger instance based around the 90 degree angle (right) of the default (index 0) * POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command * scheduler button loop}. * - * @return a Trigger instance based around the 90-degree angle of a POV on the HID. + * @return a Trigger instance based around the 90 degree angle of a POV on the HID. */ public Trigger povRight() { return pov(90); } /** - * Constructs a Trigger instance based around the 135-degree angle (right down) of the default + * Constructs a Trigger instance based around the 135 degree angle (right down) of the default * (index 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the * default command scheduler button loop}. * - * @return a Trigger instance based around the 135-degree angle of a POV on the HID. + * @return a Trigger instance based around the 135 degree angle of a POV on the HID. */ public Trigger povDownRight() { return pov(135); } /** - * Constructs a Trigger instance based around the 180-degree angle (down) of the default (index 0) + * Constructs a Trigger instance based around the 180 degree angle (down) of the default (index 0) * POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command * scheduler button loop}. * - * @return a Trigger instance based around the 180-degree angle of a POV on the HID. + * @return a Trigger instance based around the 180 degree angle of a POV on the HID. */ public Trigger povDown() { return pov(180); } /** - * Constructs a Trigger instance based around the 225-degree angle (down left) of the default + * Constructs a Trigger instance based around the 225 degree angle (down left) of the default * (index 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the * default command scheduler button loop}. * - * @return a Trigger instance based around the 225-degree angle of a POV on the HID. + * @return a Trigger instance based around the 225 degree angle of a POV on the HID. */ public Trigger povDownLeft() { return pov(225); } /** - * Constructs a Trigger instance based around the 270-degree angle (left) of the default (index 0) + * Constructs a Trigger instance based around the 270 degree angle (left) of the default (index 0) * POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default command * scheduler button loop}. * - * @return a Trigger instance based around the 270-degree angle of a POV on the HID. + * @return a Trigger instance based around the 270 degree angle of a POV on the HID. */ public Trigger povLeft() { return pov(270); } /** - * Constructs a Trigger instance based around the 315-degree angle (left up) of the default (index + * Constructs a Trigger instance based around the 315 degree angle (left up) of the default (index * 0) POV on the HID, attached to {@link CommandScheduler#getDefaultButtonLoop() the default * command scheduler button loop}. * - * @return a Trigger instance based around the 315-degree angle of a POV on the HID. + * @return a Trigger instance based around the 315 degree angle of a POV on the HID. */ public Trigger povUpLeft() { return pov(315); diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/InternalButton.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/InternalButton.java index 65bf55bef8..3106264389 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/InternalButton.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/InternalButton.java @@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * This class is intended to be used within a program. The programmer can manually set its value. - * Also includes a setting for whether or not it should invert its value. + * Also includes a setting for whether it should invert its value. * *

This class is provided by the NewCommands VendorDep */ diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h index b657f3d649..189433bf11 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h @@ -238,7 +238,7 @@ safe) semantics. * Decorates this command to only run if this condition is not met. If the * command is already running and the condition changes to true, the command * will not stop running. The requirements of this command will be kept for - * the new conditonal command. + * the new conditional command. * * @param condition the condition that will prevent the command from running * @return the decorated command diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h index 70800f4ffa..0ab1e97186 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandPtr.h @@ -163,7 +163,7 @@ class CommandPtr final { * Decorates this command to only run if this condition is not met. If the * command is already running and the condition changes to true, the command * will not stop running. The requirements of this command will be kept for - * the new conditonal command. + * the new conditional command. * * @param condition the condition that will prevent the command from running * @return the decorated command diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/MecanumControllerCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/MecanumControllerCommand.h index 4f5debd25b..8ebdbe074b 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/MecanumControllerCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/MecanumControllerCommand.h @@ -268,7 +268,7 @@ class MecanumControllerCommand * *

Note: The controllers will *not* set the outputVolts to zero upon * completion of the path - this is left to the user, since it is not - * appropriate for paths with non-stationary end-states. + * appropriate for paths with nonstationary end-states. * * @param trajectory The trajectory to follow. * @param pose A function that supplies the robot pose - use one @@ -306,7 +306,7 @@ class MecanumControllerCommand * *

Note: The controllers will *not* set the outputVolts to zero upon * completion of the path - this is left to the user, since it is not - * appropriate for paths with non-stationary end-states. + * appropriate for paths with nonstationary end-states. * *

Note 2: The final rotation of the robot will be set to the rotation of * the final pose in the trajectory. The robot will not follow the rotations @@ -346,7 +346,7 @@ class MecanumControllerCommand * *

Note: The controllers will *not* set the outputVolts to zero upon * completion of the path - this is left to the user, since it is not - * appropriate for paths with non-stationary end-states. + * appropriate for paths with nonstationary end-states. * * @param trajectory The trajectory to follow. * @param pose A function that supplies the robot pose - use one @@ -384,7 +384,7 @@ class MecanumControllerCommand * *

Note: The controllers will *not* set the outputVolts to zero upon * completion of the path - this is left to the user, since it is not - * appropriate for paths with non-stationary end-states. + * appropriate for paths with nonstationary end-states. * *

Note2: The final rotation of the robot will be set to the rotation of * the final pose in the trajectory. The robot will not follow the rotations diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/ParallelCommandGroup.h b/wpilibNewCommands/src/main/native/include/frc2/command/ParallelCommandGroup.h index 69c99f0de0..943b62f37d 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/ParallelCommandGroup.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/ParallelCommandGroup.h @@ -59,7 +59,7 @@ class ParallelCommandGroup ParallelCommandGroup(ParallelCommandGroup&& other) = default; - // No copy constructors for commandgroups + // No copy constructors for command groups ParallelCommandGroup(const ParallelCommandGroup&) = delete; // Prevent template expansion from emulating copy ctor diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h index 6b0852b011..7079afe18f 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h @@ -38,7 +38,7 @@ template class SelectCommand : public CommandHelper> { public: /** - * Creates a new selectcommand. + * Creates a new SelectCommand. * * @param commands the map of commands to choose from * @param selector the selector to determine which command to run diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h b/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h index 8a9794409c..0142c44355 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/button/Button.h @@ -243,7 +243,7 @@ class Button : public Trigger { /** * Binds a command to start when the button is pressed, and be canceled when - * it is pessed again. Transfers command ownership to the button scheduler, + * it is pressed again. Transfers command ownership to the button scheduler, * so the user does not have to worry about lifespan - rvalue refs will be * *moved*, lvalue refs will be *copied.* * diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/button/CommandGenericHID.h b/wpilibNewCommands/src/main/native/include/frc2/command/button/CommandGenericHID.h index d08af4e137..5c986dde2b 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/button/CommandGenericHID.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/button/CommandGenericHID.h @@ -66,49 +66,49 @@ class CommandGenericHID : public frc::GenericHID { CommandScheduler::GetInstance().GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 0-degree angle (up) of the + * Constructs a Trigger instance based around the 0 degree angle (up) of the * default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 0-degree angle of a POV on the + * @return a Trigger instance based around the 0 degree angle of a POV on the * HID. */ Trigger POVUp(frc::EventLoop* loop = CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 45-degree angle (right up) + * Constructs a Trigger instance based around the 45 degree angle (right up) * of the default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 45-degree angle of a POV on the + * @return a Trigger instance based around the 45 degree angle of a POV on the * HID. */ Trigger POVUpRight(frc::EventLoop* loop = CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 90-degree angle (right) of + * Constructs a Trigger instance based around the 90 degree angle (right) of * the default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 90-degree angle of a POV on the + * @return a Trigger instance based around the 90 degree angle of a POV on the * HID. */ Trigger POVRight(frc::EventLoop* loop = CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 135-degree angle (right + * Constructs a Trigger instance based around the 135 degree angle (right * down) of the default (index 0) POV on the HID. * - * @return a Trigger instance based around the 135-degree angle of a POV on + * @return a Trigger instance based around the 135 degree angle of a POV on * the HID. */ Trigger POVDownRight( @@ -116,52 +116,52 @@ class CommandGenericHID : public frc::GenericHID { CommandScheduler::GetInstance().GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 180-degree angle (down) of + * Constructs a Trigger instance based around the 180 degree angle (down) of * the default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 180-degree angle of a POV on + * @return a Trigger instance based around the 180 degree angle of a POV on * the HID. */ Trigger POVDown(frc::EventLoop* loop = CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 225-degree angle (down left) + * Constructs a Trigger instance based around the 225 degree angle (down left) * of the default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 225-degree angle of a POV on + * @return a Trigger instance based around the 225 degree angle of a POV on * the HID. */ Trigger POVDownLeft(frc::EventLoop* loop = CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 270-degree angle (left) of + * Constructs a Trigger instance based around the 270 degree angle (left) of * the default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 270-degree angle of a POV on + * @return a Trigger instance based around the 270 degree angle of a POV on * the HID. */ Trigger POVLeft(frc::EventLoop* loop = CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const; /** - * Constructs a Trigger instance based around the 315-degree angle (left up) + * Constructs a Trigger instance based around the 315 degree angle (left up) * of the default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. Defaults to * {@link CommandScheduler::GetDefaultButtonLoop() the default command * scheduler button loop}. - * @return a Trigger instance based around the 315-degree angle of a POV on + * @return a Trigger instance based around the 315 degree angle of a POV on * the HID. */ Trigger POVUpLeft(frc::EventLoop* loop = CommandScheduler::GetInstance() diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/button/JoystickButton.h b/wpilibNewCommands/src/main/native/include/frc2/command/button/JoystickButton.h index b72fb863b1..b5280c062c 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/button/JoystickButton.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/button/JoystickButton.h @@ -23,7 +23,7 @@ class JoystickButton : public Button { * Creates a JoystickButton that commands can be bound to. * * @param joystick The joystick on which the button is located. - * @param buttonNumber The number of the button on the joystic. + * @param buttonNumber The number of the button on the joystick. */ WPI_IGNORE_DEPRECATED explicit JoystickButton(frc::GenericHID* joystick, int buttonNumber) diff --git a/wpilibc/src/main/native/include/frc/GenericHID.h b/wpilibc/src/main/native/include/frc/GenericHID.h index fc5dd3642e..f6db94c374 100644 --- a/wpilibc/src/main/native/include/frc/GenericHID.h +++ b/wpilibc/src/main/native/include/frc/GenericHID.h @@ -151,73 +151,73 @@ class GenericHID { BooleanEvent POV(int pov, int angle, EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 0-degree angle (up) of + * Constructs a BooleanEvent instance based around the 0 degree angle (up) of * the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 0-degree angle of a POV on + * @return a BooleanEvent instance based around the 0 degree angle of a POV on * the HID. */ BooleanEvent POVUp(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 45-degree angle (right + * Constructs a BooleanEvent instance based around the 45 degree angle (right * up) of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 45-degree angle of a POV + * @return a BooleanEvent instance based around the 45 degree angle of a POV * on the HID. */ BooleanEvent POVUpRight(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 90-degree angle (right) + * Constructs a BooleanEvent instance based around the 90 degree angle (right) * of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 90-degree angle of a POV + * @return a BooleanEvent instance based around the 90 degree angle of a POV * on the HID. */ BooleanEvent POVRight(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 135-degree angle (right + * Constructs a BooleanEvent instance based around the 135 degree angle (right * down) of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 135-degree angle of a POV + * @return a BooleanEvent instance based around the 135 degree angle of a POV * on the HID. */ BooleanEvent POVDownRight(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 180-degree angle (down) + * Constructs a BooleanEvent instance based around the 180 degree angle (down) * of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 180-degree angle of a POV + * @return a BooleanEvent instance based around the 180 degree angle of a POV * on the HID. */ BooleanEvent POVDown(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 225-degree angle (down + * Constructs a BooleanEvent instance based around the 225 degree angle (down * left) of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 225-degree angle of a POV + * @return a BooleanEvent instance based around the 225 degree angle of a POV * on the HID. */ BooleanEvent POVDownLeft(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 270-degree angle (left) + * Constructs a BooleanEvent instance based around the 270 degree angle (left) * of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 270-degree angle of a POV + * @return a BooleanEvent instance based around the 270 degree angle of a POV * on the HID. */ BooleanEvent POVLeft(EventLoop* loop) const; /** - * Constructs a BooleanEvent instance based around the 315-degree angle (left + * Constructs a BooleanEvent instance based around the 315 degree angle (left * up) of the default (index 0) POV on the HID. * - * @return a BooleanEvent instance based around the 315-degree angle of a POV + * @return a BooleanEvent instance based around the 315 degree angle of a POV * on the HID. */ BooleanEvent POVUpLeft(EventLoop* loop) const; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16448_IMU.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16448_IMU.java index 546afb3da4..a005b73cd7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16448_IMU.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16448_IMU.java @@ -318,7 +318,7 @@ public class ADIS16448_IMU implements AutoCloseable, NTSendable { calibrate(); // Reset accumulated offsets reset(); - // Tell the acquire loop that we're done starting up + // Indicate to the acquire loop that we're done starting up m_start_up_mode = false; // Let the user know the IMU was initiallized successfully DriverStation.reportWarning("ADIS16448 IMU Successfully Initialized!", false); @@ -1105,28 +1105,28 @@ public class ADIS16448_IMU implements AutoCloseable, NTSendable { } /** - * @return X axis complementary angle in degrees + * @return X-axis complementary angle in degrees */ public synchronized double getXComplementaryAngle() { return m_compAngleX; } /** - * @return Y axis complementary angle in degrees + * @return Y-axis complementary angle in degrees */ public synchronized double getYComplementaryAngle() { return m_compAngleY; } /** - * @return X axis filtered acceleration angle in degrees + * @return X-axis filtered acceleration angle in degrees */ public synchronized double getXFilteredAccelAngle() { return m_accelAngleX; } /** - * @return Y axis filtered acceleration angle in degrees + * @return Y-axis filtered acceleration angle in degrees */ public synchronized double getYFilteredAccelAngle() { return m_accelAngleY; @@ -1136,7 +1136,7 @@ public class ADIS16448_IMU implements AutoCloseable, NTSendable { * @return Barometric Pressure in PSI */ public synchronized double getBarometricPressure() { - // mbar to PSI + // mbar to PSI conversion return m_baro * 0.0145; } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java index ebf3aed169..f287cab4e0 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/ADIS16470_IMU.java @@ -1005,28 +1005,28 @@ public class ADIS16470_IMU implements AutoCloseable, NTSendable { } /** - * @return X axis complementary angle + * @return X-axis complementary angle */ public synchronized double getXComplementaryAngle() { return m_compAngleX; } /** - * @return Y axis complementary angle + * @return Y-axis complementary angle */ public synchronized double getYComplementaryAngle() { return m_compAngleY; } /** - * @return X axis filtered acceleration angle + * @return X-axis filtered acceleration angle */ public synchronized double getXFilteredAccelAngle() { return m_accelAngleX; } /** - * @return Y axis filtered acceleration angle + * @return Y-axis filtered acceleration angle */ public synchronized double getYFilteredAccelAngle() { return m_accelAngleY; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java index f4b367ad02..2b1f54bc13 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java @@ -42,7 +42,7 @@ public class AddressableLED implements AutoCloseable { /** * Sets the length of the LED strip. * - *

Calling this is an expensive call, so its best to call it once, then just update data. + *

Calling this is an expensive call, so it's best to call it once, then just update data. * *

The max length is 5460 LEDs. * @@ -53,7 +53,7 @@ public class AddressableLED implements AutoCloseable { } /** - * Sets the led output data. + * Sets the LED output data. * *

If the output is enabled, this will start writing the next data cycle. It is safe to call, * even while output is enabled. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogEncoder.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogEncoder.java index 83c93416e2..8e458694e0 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogEncoder.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogEncoder.java @@ -144,9 +144,9 @@ public class AnalogEncoder implements Sendable, AutoCloseable { /** * Set the distance per rotation of the encoder. This sets the multiplier used to determine the - * distance driven based on the rotation value from the encoder. Set this value based on the how - * far the mechanism travels in 1 rotation of the encoder, and factor in gearing reductions - * following the encoder shaft. This distance can be in any units you like, linear or angular. + * distance driven based on the rotation value from the encoder. Set this value based on how far + * the mechanism travels in 1 rotation of the encoder, and factor in gearing reductions following + * the encoder shaft. This distance can be in any units you like, linear or angular. * * @param distancePerRotation the distance per rotation of the encoder */ diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java index e3bedcbf48..e90bfd26d5 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogInput.java @@ -107,8 +107,8 @@ public class AnalogInput implements Sendable, AutoCloseable { } /** - * Get the factory scaling least significant bit weight constant. The least significant bit weight - * constant for the channel that was calibrated in manufacturing and stored in an eeprom. + * Get the factory scaling the least significant bit weight constant. The least significant bit + * weight constant for the channel that was calibrated in manufacturing and stored in an eeprom. * *

Volts = ((LSB_Weight * 1e-9) * raw) - (Offset * 1e-9) * diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java index 4a5bd75724..7d5858574d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java @@ -23,8 +23,8 @@ public class AnalogPotentiometer implements Sendable, AutoCloseable { * AnalogPotentiometer constructor. * *

Use the fullRange and offset values so that the output produces meaningful values. I.E: you - * have a 270 degree potentiometer and you want the output to be degrees with the halfway point as - * 0 degrees. The fullRange value is 270.0(degrees) and the offset is -135.0 since the halfway + * have a 270 degree potentiometer, and you want the output to be degrees with the halfway point + * as 0 degrees. The fullRange value is 270.0(degrees) and the offset is -135.0 since the halfway * point after scaling is 135 degrees. This will calculate the result from the fullRange times the * fraction of the supply voltage, plus the offset. * @@ -43,8 +43,8 @@ public class AnalogPotentiometer implements Sendable, AutoCloseable { * AnalogPotentiometer constructor. * *

Use the fullRange and offset values so that the output produces meaningful values. I.E: you - * have a 270 degree potentiometer and you want the output to be degrees with the halfway point as - * 0 degrees. The fullRange value is 270.0(degrees) and the offset is -135.0 since the halfway + * have a 270 degree potentiometer, and you want the output to be degrees with the halfway point + * as 0 degrees. The fullRange value is 270.0(degrees) and the offset is -135.0 since the halfway * point after scaling is 135 degrees. This will calculate the result from the fullRange times the * fraction of the supply voltage, plus the offset. * @@ -66,7 +66,7 @@ public class AnalogPotentiometer implements Sendable, AutoCloseable { * AnalogPotentiometer constructor. * *

Use the scale value so that the output produces meaningful values. I.E: you have a 270 - * degree potentiometer and you want the output to be degrees with the starting point as 0 + * degree potentiometer, and you want the output to be degrees with the starting point as 0 * degrees. The scale value is 270.0(degrees). * * @param channel The analog input channel this potentiometer is plugged into. 0-3 are on-board @@ -81,7 +81,7 @@ public class AnalogPotentiometer implements Sendable, AutoCloseable { * AnalogPotentiometer constructor. * *

Use the fullRange and offset values so that the output produces meaningful values. I.E: you - * have a 270 degree potentiometer and you want the output to be degrees with the starting point + * have a 270 degree potentiometer, and you want the output to be degrees with the starting point * as 0 degrees. The scale value is 270.0(degrees). * * @param input The {@link AnalogInput} this potentiometer is plugged into. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogTriggerOutput.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogTriggerOutput.java index e1c04ec6d5..0f37edc251 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogTriggerOutput.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogTriggerOutput.java @@ -22,8 +22,8 @@ import edu.wpi.first.util.sendable.SendableBuilder; * upper limit, then the output is true. If the analog value is in between, then the trigger output * state maintains its most recent value. * - *

The InWindow output indicates whether or not the analog signal is inside the range defined by - * the limits. + *

The InWindow output indicates whether the analog signal is inside the range defined by the + * limits. * *

The RisingPulse and FallingPulse outputs detect an instantaneous transition from above the * upper limit to below the lower limit, and vise versa. These pulses represent a rollover condition diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java index 3dc6c1d79e..77ccb3741b 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java @@ -149,7 +149,7 @@ public class CAN implements Closeable { } /** - * Read a CAN packet. The will continuously return the last packet received, without accounting + * Read a CAN packet. This will continuously return the last packet received, without accounting * for packet age. * * @param apiId The API ID to read. @@ -161,7 +161,7 @@ public class CAN implements Closeable { } /** - * Read a CAN packet. The will return the last packet received until the packet is older then the + * Read a CAN packet. This will return the last packet received until the packet is older than the * requested timeout. Then it will return false. * * @param apiId The API ID to read. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java index 735a8cf0c8..01483abff3 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Counter.java @@ -385,7 +385,7 @@ public class Counter implements CounterBase, Sendable, AutoCloseable { } /** - * Reset the Counter to zero. Set the counter value to zero. This doesn't effect the running state + * Reset the Counter to zero. Set the counter value to zero. This doesn't affect the running state * of the counter, just sets the current value to zero. */ @Override @@ -425,7 +425,7 @@ public class Counter implements CounterBase, Sendable, AutoCloseable { /** * Determine if the clock is stopped. Determine if the clocked input is stopped based on the * MaxPeriod value set using the SetMaxPeriod method. If the clock exceeds the MaxPeriod, then the - * device (and counter) are assumed to be stopped and it returns true. + * device (and counter) are assumed to be stopped and the method will return true. * * @return true if the most recent counter period exceeds the MaxPeriod value set by SetMaxPeriod. */ diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CounterBase.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CounterBase.java index 735b893048..60d56909d3 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CounterBase.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CounterBase.java @@ -6,14 +6,14 @@ package edu.wpi.first.wpilibj; /** * Interface for counting the number of ticks on a digital input channel. Encoders, Gear tooth - * sensors, and counters should all subclass this so it can be used to build more advanced classes - * for control and driving. + * sensors, and counters should all subclass this in order to build more advanced classes for + * control and driving. * *

All counters will immediately start counting - reset() them if you need them to be zeroed * before use. */ public interface CounterBase { - /** The number of edges for the counterbase to increment or decrement on. */ + /** The number of edges for the CounterBase to increment or decrement on. */ enum EncodingType { /** Count only the rising edge. */ k1X(0), diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalGlitchFilter.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalGlitchFilter.java index abcc67b967..3422d34a97 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalGlitchFilter.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalGlitchFilter.java @@ -15,7 +15,7 @@ import java.util.concurrent.locks.ReentrantLock; /** * Class to enable glitch filtering on a set of digital inputs. This class will manage adding and - * removing digital inputs from a FPGA glitch filter. The filter lets the user configure the time + * removing digital inputs from an FPGA glitch filter. The filter lets the user configure the time * that an input must remain high or low before it is classified as high or low. */ public class DigitalGlitchFilter implements Sendable, AutoCloseable { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalOutput.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalOutput.java index 43af5c7b69..78e8bedbe2 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalOutput.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DigitalOutput.java @@ -138,7 +138,7 @@ public class DigitalOutput extends DigitalSource implements Sendable { * *

Allocate one of the 6 DO PWM generator resources. * - *

Supply the initial duty-cycle to output so as to avoid a glitch when first starting. + *

Supply the initial duty-cycle to output in order to avoid a glitch when first starting. * *

The resolution of the duty cycle is 8-bit for low frequencies (1kHz or less) but is reduced * the higher the frequency of the PWM signal is. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java index 139e2edc27..e9d593cd1d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java @@ -1160,7 +1160,7 @@ public final class DriverStation { public static void refreshData() { DriverStationJNI.refreshDSData(); - // Get the status of all of the joysticks + // Get the status of all the joysticks for (byte stick = 0; stick < kJoystickPorts; stick++) { m_joystickAxesCache[stick].m_count = DriverStationJNI.getJoystickAxes(stick, m_joystickAxesCache[stick].m_axes); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DutyCycleEncoder.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DutyCycleEncoder.java index fc097a1e0b..dd78860e52 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DutyCycleEncoder.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DutyCycleEncoder.java @@ -200,9 +200,9 @@ public class DutyCycleEncoder implements Sendable, AutoCloseable { /** * Set the distance per rotation of the encoder. This sets the multiplier used to determine the - * distance driven based on the rotation value from the encoder. Set this value based on the how - * far the mechanism travels in 1 rotation of the encoder, and factor in gearing reductions - * following the encoder shaft. This distance can be in any units you like, linear or angular. + * distance driven based on the rotation value from the encoder. Set this value based on how far + * the mechanism travels in 1 rotation of the encoder, and factor in gearing reductions following + * the encoder shaft. This distance can be in any units you like, linear or angular. * * @param distancePerRotation the distance per rotation of the encoder */ diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Encoder.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Encoder.java index 54cca78d50..24762721ab 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Encoder.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Encoder.java @@ -42,9 +42,9 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } } - /** The a source. */ + /** The 'a' source. */ protected DigitalSource m_aSource; // the A phase of the quad encoder - /** The b source. */ + /** The 'b' source. */ protected DigitalSource m_bSource; // the B phase of the quad encoder /** The index source. */ protected DigitalSource m_indexSource; // Index on some encoders @@ -84,8 +84,8 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { * *

The encoder will start counting immediately. * - * @param channelA The a channel DIO channel. 0-9 are on-board, 10-25 are on the MXP port - * @param channelB The b channel DIO channel. 0-9 are on-board, 10-25 are on the MXP port + * @param channelA The 'a' channel DIO channel. 0-9 are on-board, 10-25 are on the MXP port + * @param channelB The 'b' channel DIO channel. 0-9 are on-board, 10-25 are on the MXP port * @param reverseDirection represents the orientation of the encoder and inverts the output values * if necessary so forward represents positive values. */ @@ -94,7 +94,7 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a and b channels. + * Encoder constructor. Construct an Encoder given a and b channels. * *

The encoder will start counting immediately. * @@ -106,7 +106,7 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a and b channels. + * Encoder constructor. Construct an Encoder given a and b channels. * *

The encoder will start counting immediately. * @@ -117,7 +117,7 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { * @param encodingType either k1X, k2X, or k4X to indicate 1X, 2X or 4X decoding. If 4X is * selected, then an encoder FPGA object is used and the returned counts will be 4x the * encoder spec'd value since all rising and falling edges are counted. If 1X or 2X are - * selected then a m_counter object will be used and the returned value will either exactly + * selected, then a counter object will be used and the returned value will either exactly * match the spec'd count or be double (2x) the spec'd count. */ public Encoder( @@ -139,8 +139,8 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a and b channels. Using an index pulse forces 4x - * encoding + * Encoder constructor. Construct an Encoder given a and b channels. Using an index pulse forces + * 4x encoding * *

The encoder will start counting immediately. * @@ -160,8 +160,8 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a and b channels. Using an index pulse forces 4x - * encoding + * Encoder constructor. Construct an Encoder given a and b channels. Using an index pulse forces + * 4x encoding * *

The encoder will start counting immediately. * @@ -174,14 +174,14 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a and b channels as digital inputs. This is used - * in the case where the digital inputs are shared. The Encoder class will not allocate the + * Encoder constructor. Construct an Encoder given a and b channels as digital inputs. This is + * used in the case where the digital inputs are shared. The Encoder class will not allocate the * digital inputs and assume that they already are counted. * *

The encoder will start counting immediately. * - * @param sourceA The source that should be used for the a channel. - * @param sourceB the source that should be used for the b channel. + * @param sourceA The source that should be used for the 'a' channel. + * @param sourceB the source that should be used for the 'b' channel. * @param reverseDirection represents the orientation of the encoder and inverts the output values * if necessary so forward represents positive values. */ @@ -190,34 +190,34 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a and b channels as digital inputs. This is used - * in the case where the digital inputs are shared. The Encoder class will not allocate the + * Encoder constructor. Construct an Encoder given a and b channels as digital inputs. This is + * used in the case where the digital inputs are shared. The Encoder class will not allocate the * digital inputs and assume that they already are counted. * *

The encoder will start counting immediately. * - * @param sourceA The source that should be used for the a channel. - * @param sourceB the source that should be used for the b channel. + * @param sourceA The source that should be used for the 'a' channel. + * @param sourceB the source that should be used for the 'b' channel. */ public Encoder(DigitalSource sourceA, DigitalSource sourceB) { this(sourceA, sourceB, false); } /** - * Encoder constructor. Construct a Encoder given a and b channels as digital inputs. This is used - * in the case where the digital inputs are shared. The Encoder class will not allocate the + * Encoder constructor. Construct an Encoder given a and b channels as digital inputs. This is + * used in the case where the digital inputs are shared. The Encoder class will not allocate the * digital inputs and assume that they already are counted. * *

The encoder will start counting immediately. * - * @param sourceA The source that should be used for the a channel. - * @param sourceB the source that should be used for the b channel. + * @param sourceA The source that should be used for the 'a' channel. + * @param sourceB the source that should be used for the 'b' channel. * @param reverseDirection represents the orientation of the encoder and inverts the output values * if necessary so forward represents positive values. * @param encodingType either k1X, k2X, or k4X to indicate 1X, 2X or 4X decoding. If 4X is * selected, then an encoder FPGA object is used and the returned counts will be 4x the * encoder spec'd value since all rising and falling edges are counted. If 1X or 2X are - * selected then a m_counter object will be used and the returned value will either exactly + * selected then a counter object will be used and the returned value will either exactly * match the spec'd count or be double (2x) the spec'd count. */ public Encoder( @@ -239,14 +239,14 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a, b and index channels as digital inputs. This + * Encoder constructor. Construct an Encoder given a, b and index channels as digital inputs. This * is used in the case where the digital inputs are shared. The Encoder class will not allocate * the digital inputs and assume that they already are counted. * *

The encoder will start counting immediately. * - * @param sourceA The source that should be used for the a channel. - * @param sourceB the source that should be used for the b channel. + * @param sourceA The source that should be used for the 'a' channel. + * @param sourceB the source that should be used for the 'b' channel. * @param indexSource the source that should be used for the index channel. * @param reverseDirection represents the orientation of the encoder and inverts the output values * if necessary so forward represents positive values. @@ -263,14 +263,14 @@ public class Encoder implements CounterBase, Sendable, AutoCloseable { } /** - * Encoder constructor. Construct a Encoder given a, b and index channels as digital inputs. This + * Encoder constructor. Construct an Encoder given a, b and index channels as digital inputs. This * is used in the case where the digital inputs are shared. The Encoder class will not allocate * the digital inputs and assume that they already are counted. * *

The encoder will start counting immediately. * - * @param sourceA The source that should be used for the a channel. - * @param sourceB the source that should be used for the b channel. + * @param sourceA The source that should be used for the 'a' channel. + * @param sourceB the source that should be used for the 'b' channel. * @param indexSource the source that should be used for the index channel. */ public Encoder(DigitalSource sourceA, DigitalSource sourceB, DigitalSource indexSource) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Filesystem.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Filesystem.java index 98230dbbe5..125c1e2a04 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Filesystem.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Filesystem.java @@ -41,12 +41,11 @@ public final class Filesystem { } /** - * Obtains the deploy directory of the program, which is the remote location src/main/deploy is - * deployed to by default. On the roboRIO, this is /home/lvuser/deploy. In simulation, it is where - * the simulation was launched from, in the subdirectory "src/main/deploy" - * (`pwd`/src/main/deploy). + * Obtains the 'deploy' directory of the program, located at src/main/deploy, which is deployed by + * default. On the roboRIO, this is /home/lvuser/deploy. In simulation, it is where the simulation + * was launched from, in the subdirectory "src/main/deploy" (`pwd`/src/main/deploy). * - * @return The deploy directory + * @return The 'deploy' directory */ public static File getDeployDirectory() { if (RobotBase.isReal()) { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java index a89966efc9..58e55f0242 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/GenericHID.java @@ -147,7 +147,7 @@ public class GenericHID { /** * Get the angle in degrees of a POV on the HID. * - *

The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, + *

The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90, * upper-left is 315). * * @param pov The index of the POV to read (starting at 0). Defaults to 0. @@ -160,7 +160,7 @@ public class GenericHID { /** * Get the angle in degrees of the default POV (index 0) on the HID. * - *

The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, + *

The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90, * upper-left is 315). * * @return the angle of the POV in degrees, or -1 if the POV is not pressed. @@ -186,7 +186,7 @@ public class GenericHID { /** * Constructs a BooleanEvent instance based around this angle of a POV on the HID. * - *

The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90, + *

The POV angles start at 0 in the up direction, and increase clockwise (e.g. right is 90, * upper-left is 315). * * @param pov index of the POV to read (starting at 0). Defaults to 0. @@ -199,88 +199,88 @@ public class GenericHID { } /** - * Constructs a BooleanEvent instance based around the 0-degree angle (up) of the default (index + * Constructs a BooleanEvent instance based around the 0 degree angle (up) of the default (index * 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 0-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 0 degree angle of a POV on the HID. */ public BooleanEvent povUp(EventLoop loop) { return pov(0, loop); } /** - * Constructs a BooleanEvent instance based around the 45-degree angle (right up) of the default + * Constructs a BooleanEvent instance based around the 45 degree angle (right up) of the default * (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 45-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 45 degree angle of a POV on the HID. */ public BooleanEvent povUpRight(EventLoop loop) { return pov(45, loop); } /** - * Constructs a BooleanEvent instance based around the 90-degree angle (right) of the default + * Constructs a BooleanEvent instance based around the 90 degree angle (right) of the default * (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 90-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 90 degree angle of a POV on the HID. */ public BooleanEvent povRight(EventLoop loop) { return pov(90, loop); } /** - * Constructs a BooleanEvent instance based around the 135-degree angle (right down) of the + * Constructs a BooleanEvent instance based around the 135 degree angle (right down) of the * default (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 135-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 135 degree angle of a POV on the HID. */ public BooleanEvent povDownRight(EventLoop loop) { return pov(135, loop); } /** - * Constructs a BooleanEvent instance based around the 180-degree angle (down) of the default + * Constructs a BooleanEvent instance based around the 180 degree angle (down) of the default * (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 180-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 180 degree angle of a POV on the HID. */ public BooleanEvent povDown(EventLoop loop) { return pov(180, loop); } /** - * Constructs a BooleanEvent instance based around the 225-degree angle (down left) of the default + * Constructs a BooleanEvent instance based around the 225 degree angle (down left) of the default * (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 225-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 225 degree angle of a POV on the HID. */ public BooleanEvent povDownLeft(EventLoop loop) { return pov(225, loop); } /** - * Constructs a BooleanEvent instance based around the 270-degree angle (left) of the default + * Constructs a BooleanEvent instance based around the 270 degree angle (left) of the default * (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 270-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 270 degree angle of a POV on the HID. */ public BooleanEvent povLeft(EventLoop loop) { return pov(270, loop); } /** - * Constructs a BooleanEvent instance based around the 315-degree angle (left up) of the default + * Constructs a BooleanEvent instance based around the 315 degree angle (left up) of the default * (index 0) POV on the HID. * * @param loop the event loop instance to attach the event to. - * @return a BooleanEvent instance based around the 315-degree angle of a POV on the HID. + * @return a BooleanEvent instance based around the 315 degree angle of a POV on the HID. */ public BooleanEvent povUpLeft(EventLoop loop) { return pov(315, loop); @@ -379,10 +379,10 @@ public class GenericHID { } /** - * Get the axis type of a joystick axis. + * Get the axis type of the provided joystick axis. * * @param axis The axis to read, starting at 0. - * @return the axis type of a joystick axis. + * @return the axis type of the given joystick axis */ public int getAxisType(int axis) { return DriverStation.getJoystickAxisType(m_port, axis); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PWM.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PWM.java index 9d86ab891b..e1f0a96ee1 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PWM.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PWM.java @@ -213,7 +213,7 @@ public class PWM implements Sendable, AutoCloseable { return PWMJNI.getPWMRaw(m_handle); } - /** Temporarily disables the PWM output. The next set call will reenable the output. */ + /** Temporarily disables the PWM output. The next set call will re-enable the output. */ public void setDisabled() { PWMJNI.setPWMDisabled(m_handle); } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java index 68121ba00c..a80fd453ff 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java @@ -246,7 +246,7 @@ public final class Preferences { } /** - * Returns whether or not there is a key with the given name. + * Returns whether there is a key with the given name. * * @param key the key * @return if there is a value at the given key diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Relay.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Relay.java index ea33f97981..a2a58d3e53 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Relay.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Relay.java @@ -159,7 +159,7 @@ public class Relay extends MotorSafety implements Sendable, AutoCloseable { *

When set to kBothDirections, the relay can be set to any of the four states: 0v-0v, 12v-0v, * 0v-12v, 12v-12v * - *

When set to kForwardOnly or kReverseOnly, you can specify the constant for the direction or + *

When set to kForwardOnly or kReverseOnly, you can specify the constant for the direction, or * you can simply specify kOff and kOn. Using only kOff and kOn is recommended. * * @param value The state to set the relay. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Resource.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Resource.java index 09137d62cd..f4b04587ad 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Resource.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Resource.java @@ -9,14 +9,14 @@ import edu.wpi.first.hal.util.CheckedAllocationException; /** * Track resources in the program. The Resource class is a convenient way of keeping track of - * allocated arbitrary resources in the program. Resources are just indices that have an lower and + * allocated arbitrary resources in the program. Resources are just indices that have a lower and * upper bound that are tracked by this class. In the library they are used for tracking allocation * of hardware channels but this is purely arbitrary. The resource class does not do any actual * allocation, but simply tracks if a given index is currently in use. * *

WARNING: this should only be statically allocated. When the program loads into memory * all the static constructors are called. At that time a linked list of all the "Resources" is - * created. Then when the program actually starts - in the Robot constructor, all resources are + * created. Then, when the program actually starts - in the Robot constructor, all resources are * initialized. This ensures that the program is restartable in memory without having to * unload/reload. */ @@ -71,7 +71,7 @@ public final class Resource { /** * Allocate a specific resource value. The user requests a specific resource value, i.e. channel - * number and it is verified unallocated, then returned. + * number, and it is verified unallocated, then returned. * * @param index The resource to allocate * @return The index of the allocated block @@ -90,8 +90,8 @@ public final class Resource { /** * Free an allocated resource. After a resource is no longer needed, for example a destructor is - * called for a channel assignment class, Free will release the resource value so it can be reused - * somewhere else in the program. + * called for a channel assignment class, this method will release the resource value, so it can + * be reused somewhere else in the program. * * @param index The index of the resource to free. */ diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java index 9f4aee2df0..e4fb96244c 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java @@ -137,14 +137,14 @@ public abstract class RobotBase implements AutoCloseable { * completion before Autonomous is entered. * *

This must be used to ensure that the communications code starts. In the future it would be - * nice to put this code into it's own task that loads on boot so ensure that it runs. + * nice to put this code into its own task that loads on boot so ensure that it runs. */ protected RobotBase() { final NetworkTableInstance inst = NetworkTableInstance.getDefault(); m_threadId = Thread.currentThread().getId(); setupCameraServerShared(); setupMathShared(); - // subscribe to "" to force persistent values to progagate to local + // subscribe to "" to force persistent values to propagate to local m_suball = new MultiSubscriber(inst, new String[] {""}); if (isReal()) { inst.startServer("/home/lvuser/networktables.json"); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java index 1e4c3e5fda..73a0b23e0f 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java @@ -12,7 +12,7 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; -/** Represents a SPI bus port. */ +/** Represents an SPI bus port. */ public class SPI implements AutoCloseable { public enum Port { kOnboardCS0(SPIJNI.ONBOARD_CS0_PORT), @@ -84,7 +84,7 @@ public class SPI implements AutoCloseable { } /** - * Configure the order that bits are sent and received on the wire to be most significant bit + * Configure the order that bits are sent and received on the wire to be the most significant bit * first. * * @deprecated Does not work, will be removed. @@ -95,7 +95,7 @@ public class SPI implements AutoCloseable { } /** - * Configure the order that bits are sent and received on the wire to be least significant bit + * Configure the order that bits are sent and received on the wire to be the least significant bit * first. * * @deprecated Does not work, will be removed. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java index d89727b75f..1a05c8af4d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java @@ -164,9 +164,8 @@ public class SerialPort implements AutoCloseable { /** * Enable termination and specify the termination character. * - *

Termination is currently only implemented for receive. When the the terminator is received, - * the read() or readString() will return fewer bytes than requested, stopping after the - * terminator. + *

Termination is currently only implemented for receive. When the terminator is received, the + * read() or readString() will return fewer bytes than requested, stopping after the terminator. * * @param terminator The character to use for termination. */ @@ -177,9 +176,8 @@ public class SerialPort implements AutoCloseable { /** * Enable termination with the default terminator '\n' * - *

Termination is currently only implemented for receive. When the the terminator is received, - * the read() or readString() will return fewer bytes than requested, stopping after the - * terminator. + *

Termination is currently only implemented for receive. When the terminator is received, the + * read() or readString() will return fewer bytes than requested, stopping after the terminator. * *

The default terminator is '\n' */ @@ -268,7 +266,7 @@ public class SerialPort implements AutoCloseable { *

This defines the timeout for transactions with the hardware. It will affect reads if less * bytes are available than the read buffer size (defaults to 1) and very large writes. * - * @param timeout The number of seconds to to wait for I/O. + * @param timeout The number of seconds to wait for I/O. */ public void setTimeout(double timeout) { SerialPortJNI.serialSetTimeout(m_portHandle, timeout); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousInterrupt.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousInterrupt.java index 3e553509d7..705d6b1a7c 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousInterrupt.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousInterrupt.java @@ -101,14 +101,14 @@ public class SynchronousInterrupt implements AutoCloseable { * @param ignorePrevious True to ignore if a previous interrupt has occurred, and only wait for a * new trigger. False will consider if an interrupt has occurred since the last time the * interrupt was read. - * @return Result of which edges were triggered, or if an timeout occurred. + * @return Result of which edges were triggered, or if a timeout occurred. */ public WaitResult waitForInterrupt(double timeoutSeconds, boolean ignorePrevious) { long result = InterruptJNI.waitForInterrupt(m_handle, timeoutSeconds, ignorePrevious); // Rising edge result is the interrupt bit set in the byte 0xFF // Falling edge result is the interrupt bit set in the byte 0xFF00 - // Set any bit set to be true for that edge, and AND the 2 results + // Set any bit set to be true for that edge, and then conduct a logical AND on the 2 results // together to match the existing enum for all interrupts boolean rising = (result & 0xFF) != 0; boolean falling = (result & 0xFF00) != 0; @@ -119,7 +119,7 @@ public class SynchronousInterrupt implements AutoCloseable { * Wait for an interrupt, ignoring any previously occurring interrupts. * * @param timeoutSeconds The timeout in seconds. 0 or less will return immediately. - * @return Result of which edges were triggered, or if an timeout occurred. + * @return Result of which edges were triggered, or if a timeout occurred. */ public WaitResult waitForInterrupt(double timeoutSeconds) { return waitForInterrupt(timeoutSeconds, true); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Ultrasonic.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Ultrasonic.java index ae9ac557f2..d7b326a2bf 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Ultrasonic.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Ultrasonic.java @@ -79,7 +79,7 @@ public class Ultrasonic implements Sendable, AutoCloseable { /** * Initialize the Ultrasonic Sensor. This is the common code that initializes the ultrasonic * sensor given that there are two digital I/O channels allocated. If the system was running in - * automatic mode (round robin) when the new sensor is added, it is stopped, the sensor is added, + * automatic mode (round-robin) when the new sensor is added, it is stopped, the sensor is added, * then automatic mode is restored. */ private synchronized void initialize() { @@ -103,7 +103,7 @@ public class Ultrasonic implements Sendable, AutoCloseable { m_counter.setMaxPeriod(1.0); m_counter.setSemiPeriodMode(true); m_counter.reset(); - m_enabled = true; // make it available for round robin scheduling + m_enabled = true; // make it available for round-robin scheduling setAutomaticMode(originalMode); m_instances++; @@ -116,7 +116,7 @@ public class Ultrasonic implements Sendable, AutoCloseable { } /** - * Create an instance of the Ultrasonic Sensor. This is designed to supchannel the Daventech SRF04 + * Create an instance of the Ultrasonic Sensor. This is designed to support the Daventech SRF04 * and Vex ultrasonic sensors. * * @param pingChannel The digital output channel that sends the pulse to initiate the sensor @@ -153,7 +153,7 @@ public class Ultrasonic implements Sendable, AutoCloseable { /** * Destructor for the ultrasonic sensor. Delete the instance of the ultrasonic sensor by freeing - * the allocated digital channels. If the system was in automatic mode (round robin), then it is + * the allocated digital channels. If the system was in automatic mode (round-robin), then it is * stopped, then started again after this sensor is removed (provided this wasn't the last * sensor). */ @@ -194,10 +194,10 @@ public class Ultrasonic implements Sendable, AutoCloseable { /** * Turn Automatic mode on/off for all sensors. * - *

When in Automatic mode, all sensors will fire in round robin, waiting a set time between + *

When in Automatic mode, all sensors will fire in round-robin, waiting a set time between * each sensor. * - * @param enabling Set to true if round robin scheduling should start for all the ultrasonic + * @param enabling Set to true if round-robin scheduling should start for all the ultrasonic * sensors. This scheduling method assures that the sensors are non-interfering because no two * sensors fire at the same time. If another scheduling algorithm is preferred, it can be * implemented by pinging the sensors manually and waiting for the results to come back. @@ -239,12 +239,12 @@ public class Ultrasonic implements Sendable, AutoCloseable { /** * Single ping to ultrasonic sensor. Send out a single ping to the ultrasonic sensor. This only - * works if automatic (round robin) mode is disabled. A single ping is sent out, and the counter + * works if automatic (round-robin) mode is disabled. A single ping is sent out, and the counter * should count the semi-period when it comes in. The counter is reset to make the current value * invalid. */ public void ping() { - setAutomaticMode(false); // turn off automatic round robin if pinging + setAutomaticMode(false); // turn off automatic round-robin if pinging // single sensor m_counter.reset(); // reset the counter to zero (invalid data now) // do the ping to start getting a single range diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/ExternalDirectionCounter.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/ExternalDirectionCounter.java index 76dde7063c..6828b9a53a 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/ExternalDirectionCounter.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/ExternalDirectionCounter.java @@ -72,7 +72,7 @@ public class ExternalDirectionCounter implements Sendable, AutoCloseable { } /** - * Sets to revese the counter direction. + * Sets to reverse the counter direction. * * @param reverseDirection True to reverse counting direction. */ diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java index ad3bf50bd9..1ee160c79f 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java @@ -135,7 +135,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea * Drive method for Mecanum platform. * *

Angles are measured counterclockwise from the positive X axis. The robot's speed is - * independent from its angle or rotation rate. + * independent of its angle or rotation rate. * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Left is positive. @@ -150,7 +150,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea * Drive method for Mecanum platform. * *

Angles are measured counterclockwise from the positive X axis. The robot's speed is - * independent from its angle or rotation rate. + * independent of its angle or rotation rate. * * @param xSpeed The robot's speed along the Y axis [-1.0..1.0]. Forward is positive. * @param ySpeed The robot's speed along the X axis [-1.0..1.0]. Left is positive. @@ -183,7 +183,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea * Drive method for Mecanum platform. * *

Angles are measured counterclockwise from straight ahead. The speed at which the robot - * drives (translation) is independent from its angle or rotation rate. + * drives (translation) is independent of its angle or rotation rate. * * @param magnitude The robot's speed at a given angle [-1.0..1.0]. Forward is positive. * @param angle The gyro heading around the Z axis at which the robot drives. @@ -204,7 +204,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea * Cartesian inverse kinematics for Mecanum platform. * *

Angles are measured counterclockwise from the positive X axis. The robot's speed is - * independent from its angle or rotation rate. + * independent of its angle or rotation rate. * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Left is positive. @@ -219,8 +219,8 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea /** * Cartesian inverse kinematics for Mecanum platform. * - *

Angles are measured clockwise from the positive X axis. The robot's speed is independent - * from its angle or rotation rate. + *

Angles are measured clockwise from the positive X axis. The robot's speed is independent of + * its angle or rotation rate. * * @param xSpeed The robot's speed along the X axis [-1.0..1.0]. Forward is positive. * @param ySpeed The robot's speed along the Y axis [-1.0..1.0]. Left is positive. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Accelerometer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Accelerometer.java index de2780f6ed..3cfd27d227 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Accelerometer.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Accelerometer.java @@ -22,16 +22,16 @@ public interface Accelerometer { void setRange(Range range); /** - * Common interface for getting the x axis acceleration. + * Common interface for getting the x-axis acceleration. * - * @return The acceleration along the x axis in g-forces + * @return The acceleration along the x-axis in g-forces */ double getX(); /** - * Common interface for getting the y axis acceleration. + * Common interface for getting the y-axis acceleration. * - * @return The acceleration along the y axis in g-forces + * @return The acceleration along the y-axis in g-forces */ double getY(); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Gyro.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Gyro.java index 27377be03e..660aad82e0 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Gyro.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Gyro.java @@ -17,7 +17,7 @@ public interface Gyro extends AutoCloseable { /** * Reset the gyro. Resets the gyro to a heading of zero. This can be used if there is significant - * drift in the gyro and it needs to be recalibrated after it has been running. + * drift in the gyro, and it needs to be recalibrated after it has been running. */ void reset(); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/livewindow/LiveWindow.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/livewindow/LiveWindow.java index 4c1a7aece4..a47f866992 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/livewindow/LiveWindow.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/livewindow/LiveWindow.java @@ -84,7 +84,7 @@ public final class LiveWindow { * *

If it's being enabled, turn off the scheduler and remove all the commands from the queue and * enable all the components registered for LiveWindow. If it's being disabled, stop all the - * registered components and reenable the scheduler. + * registered components and re-enable the scheduler. * *

TODO: add code to disable PID loops when enabling LiveWindow. The commands should reenable * the PID loops themselves when they get rescheduled. This prevents arms from starting to move diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/package.html b/wpilibj/src/main/java/edu/wpi/first/wpilibj/package.html index d11ae27cdb..fdef7b43fc 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/package.html +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/package.html @@ -13,7 +13,7 @@ utility functions like timing and field management. The library is designed to: