Fix documentation warnings generated by JavaDoc (NFC) (#3428)

Some C++ Doxygen comments were updated to reflect any wording changes.

See `rg "(@return|@param \w+) TODO" | less` for list of incomplete docs.
This commit is contained in:
Tyler Veness
2021-06-10 20:46:47 -07:00
committed by GitHub
parent 9e1b7e0464
commit 4d9ff76433
108 changed files with 1113 additions and 429 deletions

View File

@@ -227,6 +227,8 @@ public class AnalogInput implements Sendable, AutoCloseable {
* <p>This center value is based on the output of the oversampled and averaged source the
* accumulator channel. Because of this, any non-zero oversample bits will affect the size of the
* value for this field.
*
* @param center The accumulator's center value.
*/
public void setAccumulatorCenter(int center) {
AnalogJNI.setAccumulatorCenter(m_port, center);

View File

@@ -39,7 +39,11 @@ public class AnalogOutput implements Sendable, AutoCloseable {
m_channel = 0;
}
/** Get the channel of this AnalogOutput. */
/**
* Get the channel of this AnalogOutput.
*
* @return The channel of this AnalogOutput.
*/
public int getChannel() {
return m_channel;
}

View File

@@ -96,6 +96,7 @@ public class CAN implements Closeable {
*
* @param data The data to write (8 bytes max)
* @param apiId The API ID to write.
* @return TODO
*/
public int writePacketNoThrow(byte[] data, int apiId) {
return CANAPIJNI.writeCANPacketNoThrow(m_handle, data, apiId);
@@ -108,6 +109,7 @@ public class CAN implements Closeable {
* @param data The data to write (8 bytes max)
* @param apiId The API ID to write.
* @param repeatMs The period to repeat the packet at.
* @return TODO
*/
public int writePacketRepeatingNoThrow(byte[] data, int apiId, int repeatMs) {
return CANAPIJNI.writeCANPacketRepeatingNoThrow(m_handle, data, apiId, repeatMs);
@@ -119,6 +121,7 @@ public class CAN implements Closeable {
*
* @param length The length to request (0 to 8)
* @param apiId The API ID to write.
* @return TODO
*/
public int writeRTRFrameNoThrow(int length, int apiId) {
return CANAPIJNI.writeCANRTRFrameNoThrow(m_handle, length, apiId);

View File

@@ -53,7 +53,11 @@ public class Counter implements CounterBase, Sendable, AutoCloseable {
private int m_index; // /< The index of this counter.
private double m_distancePerPulse; // distance of travel for each tick
/** Create an instance of a counter with the given mode. */
/**
* Create an instance of a counter with the given mode.
*
* @param mode The counter mode.
*/
public Counter(final Mode mode) {
ByteBuffer index = ByteBuffer.allocateDirect(4);
// set the byte order

View File

@@ -343,6 +343,7 @@ public class DriverStation {
/**
* Report error to Driver Station. Optionally appends Stack trace to error message.
*
* @param error The error to report.
* @param printTrace If true, append stack trace to error string
*/
public static void reportError(String error, boolean printTrace) {
@@ -352,6 +353,7 @@ public class DriverStation {
/**
* Report error to Driver Station. Appends provided stack trace to error message.
*
* @param error The error to report.
* @param stackTrace The stack trace to append
*/
public static void reportError(String error, StackTraceElement[] stackTrace) {
@@ -361,19 +363,21 @@ public class DriverStation {
/**
* Report warning to Driver Station. Optionally appends Stack trace to warning message.
*
* @param warning The warning to report.
* @param printTrace If true, append stack trace to warning string
*/
public static void reportWarning(String error, boolean printTrace) {
reportErrorImpl(false, 1, error, printTrace);
public static void reportWarning(String warning, boolean printTrace) {
reportErrorImpl(false, 1, warning, printTrace);
}
/**
* Report warning to Driver Station. Appends provided stack trace to warning message.
*
* @param warning The warning to report.
* @param stackTrace The stack trace to append
*/
public static void reportWarning(String error, StackTraceElement[] stackTrace) {
reportErrorImpl(false, 1, error, stackTrace);
public static void reportWarning(String warning, StackTraceElement[] stackTrace) {
reportErrorImpl(false, 1, warning, stackTrace);
}
private static void reportErrorImpl(boolean isError, int code, String error, boolean printTrace) {
@@ -565,6 +569,8 @@ public class DriverStation {
/**
* Get the state of a POV on the joystick.
*
* @param stick The joystick to read.
* @param pov The POV to read.
* @return the angle of the POV in degrees, or -1 if the POV is not pressed.
*/
public int getStickPOV(int stick, int pov) {

View File

@@ -192,12 +192,20 @@ public abstract class GenericHID {
return m_ds.getStickAxisCount(m_port);
}
/** For the current HID, return the number of POVs. */
/**
* For the current HID, return the number of POVs.
*
* @return the number of POVs for the current HID
*/
public int getPOVCount() {
return m_ds.getStickPOVCount(m_port);
}
/** For the current HID, return the number of buttons. */
/**
* For the current HID, return the number of buttons.
*
* @return the number of buttons for the current HID
*/
public int getButtonCount() {
return m_ds.getStickButtonCount(m_port);
}
@@ -232,6 +240,7 @@ public abstract class GenericHID {
/**
* Get the axis type of a joystick axis.
*
* @param axis The axis to read, starting at 0.
* @return the axis type of a joystick axis.
*/
public int getAxisType(int axis) {

View File

@@ -203,7 +203,11 @@ public abstract class IterativeRobotBase extends RobotBase {
m_ntFlushEnabled = enabled;
}
/** Gets time period between calls to Periodic() functions. */
/**
* Gets time period between calls to Periodic() functions.
*
* @return The time period between calls to Periodic() functions.
*/
public double getPeriod() {
return m_period;
}

View File

@@ -117,6 +117,8 @@ public class PWM implements Sendable, AutoCloseable {
* Gets the bounds on the PWM pulse widths. This Gets the bounds on the PWM values for a
* particular type of controller. The values determine the upper and lower speeds as well as the
* deadband bracket.
*
* @return The bounds on the PWM pulse widths.
*/
public PWMConfigDataResult getRawBounds() {
return PWMJNI.getPWMConfigRaw(m_handle);

View File

@@ -67,6 +67,7 @@ public class PowerDistributionPanel implements Sendable, AutoCloseable {
/**
* Query the current of a single channel of the PDP.
*
* @param channel The PDP channel to query.
* @return The current of one of the PDP channels (channels 0-15) in Amperes
*/
public double getCurrent(int channel) {
@@ -114,7 +115,11 @@ public class PowerDistributionPanel implements Sendable, AutoCloseable {
PDPJNI.clearPDPStickyFaults(m_handle);
}
/** Gets module number (CAN ID). */
/**
* Gets module number (CAN ID).
*
* @return The module number (CAN ID).
*/
public int getModule() {
return m_module;
}

View File

@@ -357,14 +357,23 @@ public abstract class RobotBase implements AutoCloseable {
}
}
/** Suppress the "Robots should not quit" message. */
/**
* Suppress the "Robots should not quit" message.
*
* @param value True if exit warning should be suppressed.
*/
public static void suppressExitWarning(boolean value) {
m_runMutex.lock();
m_suppressExitWarning = value;
m_runMutex.unlock();
}
/** Starting point for the applications. */
/**
* Starting point for the applications.
*
* @param <T> Robot subclass.
* @param robotSupplier Function that returns an instance of the robot subclass.
*/
public static <T extends RobotBase> void startRobot(Supplier<T> robotSupplier) {
if (!HAL.initialize(500, 0)) {
throw new IllegalStateException("Failed to initialize. Terminating");

View File

@@ -158,6 +158,10 @@ public class SPI implements AutoCloseable {
*
* <p>If not running in output only mode, also saves the data received on the CIPO input during
* the transfer into the receive FIFO.
*
* @param dataToSend The buffer containing the data to send.
* @param size The number of bytes to send.
* @return Number of bytes written or -1 on error.
*/
public int write(byte[] dataToSend, int size) {
if (dataToSend.length < size) {
@@ -173,6 +177,8 @@ public class SPI implements AutoCloseable {
* the transfer into the receive FIFO.
*
* @param dataToSend The buffer containing the data to send.
* @param size The number of bytes to send.
* @return Number of bytes written or -1 on error.
*/
@SuppressWarnings("ByteBufferBackingArray")
public int write(ByteBuffer dataToSend, int size) {
@@ -198,6 +204,9 @@ public class SPI implements AutoCloseable {
* @param initiate If true, this function pushes "0" into the transmit buffer and initiates a
* transfer. If false, this function assumes that data is already in the receive FIFO from a
* previous write.
* @param dataReceived Buffer in which to store bytes read.
* @param size Number of bytes to read.
* @return Number of bytes read or -1 on error.
*/
public int read(boolean initiate, byte[] dataReceived, int size) {
if (dataReceived.length < size) {
@@ -218,6 +227,7 @@ public class SPI implements AutoCloseable {
* previous write.
* @param dataReceived The buffer to be filled with the received data.
* @param size The length of the transaction, in bytes
* @return Number of bytes read or -1 on error.
*/
@SuppressWarnings("ByteBufferBackingArray")
public int read(boolean initiate, ByteBuffer dataReceived, int size) {
@@ -239,6 +249,7 @@ public class SPI implements AutoCloseable {
* @param dataToSend The data to be written out to the device
* @param dataReceived Buffer to receive data from the device
* @param size The length of the transaction, in bytes
* @return TODO
*/
public int transaction(byte[] dataToSend, byte[] dataReceived, int size) {
if (dataToSend.length < size) {
@@ -256,6 +267,7 @@ public class SPI implements AutoCloseable {
* @param dataToSend The data to be written out to the device.
* @param dataReceived Buffer to receive data from the device.
* @param size The length of the transaction, in bytes
* @return TODO
*/
@SuppressWarnings("ByteBufferBackingArray")
public int transaction(ByteBuffer dataToSend, ByteBuffer dataReceived, int size) {
@@ -640,6 +652,8 @@ public class SPI implements AutoCloseable {
* <p>The center value is subtracted from each value before it is added to the accumulator. This
* is used for the center value of devices like gyros and accelerometers to make integration work
* and to take the device offset into account when integrating.
*
* @param center The accumulator's center value.
*/
public void setAccumulatorCenter(int center) {
if (m_accum == null) {
@@ -650,7 +664,11 @@ public class SPI implements AutoCloseable {
}
}
/** Set the accumulator's deadband. */
/**
* Set the accumulator's deadband.
*
* @param deadband The accumulator's deadband.
*/
public void setAccumulatorDeadband(int deadband) {
if (m_accum == null) {
return;
@@ -660,7 +678,11 @@ public class SPI implements AutoCloseable {
}
}
/** Read the last value read by the accumulator engine. */
/**
* Read the last value read by the accumulator engine.
*
* @return The last value read by the accumulator engine.
*/
public int getAccumulatorLastValue() {
if (m_accum == null) {
return 0;
@@ -750,6 +772,8 @@ public class SPI implements AutoCloseable {
* <p>The center value is subtracted from each value*dt before it is added to the integrated
* value. This is used for the center value of devices like gyros and accelerometers to take the
* device offset into account when integrating.
*
* @param center The accumulator integrator's center value.
*/
public void setAccumulatorIntegratedCenter(double center) {
if (m_accum == null) {

View File

@@ -158,6 +158,7 @@ public class SerialPort implements AutoCloseable {
* Create an instance of a Serial Port class. Defaults to one stop bit.
*
* @param baudRate The baud rate to configure the serial port.
* @param port The serial port to use.
* @param dataBits The number of data bits per transfer. Valid values are between 5 and 8 bits.
* @param parity Select the type of parity checking to use.
*/
@@ -169,6 +170,7 @@ public class SerialPort implements AutoCloseable {
* Create an instance of a Serial Port class. Defaults to no parity and one stop bit.
*
* @param baudRate The baud rate to configure the serial port.
* @param port The serial port to use.
* @param dataBits The number of data bits per transfer. Valid values are between 5 and 8 bits.
*/
public SerialPort(final int baudRate, Port port, final int dataBits) {
@@ -179,6 +181,7 @@ public class SerialPort implements AutoCloseable {
* Create an instance of a Serial Port class. Defaults to 8 databits, no parity, and one stop bit.
*
* @param baudRate The baud rate to configure the serial port.
* @param port The serial port to use.
*/
public SerialPort(final int baudRate, Port port) {
this(baudRate, port, 8, Parity.kNone, StopBits.kOne);

View File

@@ -77,7 +77,11 @@ public class Solenoid implements Sendable, AutoCloseable {
set(!get());
}
/** Get the channel this solenoid is connected to. */
/**
* Get the channel this solenoid is connected to.
*
* @return The channel this solenoid is connected to.
*/
public int getChannel() {
return m_channel;
}

View File

@@ -24,6 +24,7 @@ public class SpeedControllerGroup implements MotorController, Sendable, AutoClos
/**
* Create a new SpeedControllerGroup with the provided SpeedControllers.
*
* @param speedController The first SpeedController to add.
* @param speedControllers The SpeedControllers to add
*/
public SpeedControllerGroup(

View File

@@ -35,7 +35,13 @@ public class SynchronousInterrupt implements AutoCloseable {
this.value = value;
}
/** Create a wait result. */
/**
* Create a wait result.
*
* @param rising True if a rising edge occured.
* @param falling True if a falling edge occured.
* @return A wait result.
*/
public static WaitResult getValue(boolean rising, boolean falling) {
if (rising && falling) {
return kBoth;

View File

@@ -81,7 +81,11 @@ public class Watchdog implements Closeable, Comparable<Watchdog> {
return Double.hashCode(m_expirationTime);
}
/** Returns the time in seconds since the watchdog was last fed. */
/**
* Returns the time in seconds since the watchdog was last fed.
*
* @return The time in seconds since the watchdog was last fed.
*/
public double getTime() {
return Timer.getFPGATimestamp() - m_startTime;
}
@@ -109,7 +113,11 @@ public class Watchdog implements Closeable, Comparable<Watchdog> {
}
}
/** Returns the watchdog's timeout in seconds. */
/**
* Returns the watchdog's timeout in seconds.
*
* @return The watchdog's timeout in seconds.
*/
public double getTimeout() {
m_queueMutex.lock();
try {
@@ -119,7 +127,11 @@ public class Watchdog implements Closeable, Comparable<Watchdog> {
}
}
/** Returns true if the watchdog timer has expired. */
/**
* Returns true if the watchdog timer has expired.
*
* @return True if the watchdog timer has expired.
*/
public boolean isExpired() {
m_queueMutex.lock();
try {

View File

@@ -234,7 +234,11 @@ public class PIDController implements Sendable, AutoCloseable {
m_continuous = false;
}
/** Returns true if continuous input is enabled. */
/**
* Returns true if continuous input is enabled.
*
* @return True if continuous input is enabled.
*/
public boolean isContinuousInputEnabled() {
return m_continuous;
}
@@ -282,7 +286,11 @@ public class PIDController implements Sendable, AutoCloseable {
return m_positionError;
}
/** Returns the velocity error. */
/**
* Returns the velocity error.
*
* @return The velocity error.
*/
public double getVelocityError() {
return m_velocityError;
}
@@ -292,6 +300,7 @@ public class PIDController implements Sendable, AutoCloseable {
*
* @param measurement The current measurement of the process variable.
* @param setpoint The new setpoint of the controller.
* @return The next controller output.
*/
public double calculate(double measurement, double setpoint) {
// Set setpoint to provided value
@@ -303,6 +312,7 @@ public class PIDController implements Sendable, AutoCloseable {
* Returns the next output of the PID controller.
*
* @param measurement The current measurement of the process variable.
* @return The next controller output.
*/
public double calculate(double measurement) {
m_measurement = measurement;

View File

@@ -155,7 +155,11 @@ public class ProfiledPIDController implements Sendable {
m_goal = new TrapezoidProfile.State(goal, 0);
}
/** Gets the goal for the ProfiledPIDController. */
/**
* Gets the goal for the ProfiledPIDController.
*
* @return The goal.
*/
public TrapezoidProfile.State getGoal() {
return m_goal;
}
@@ -164,6 +168,8 @@ public class ProfiledPIDController implements Sendable {
* Returns true if the error is within the tolerance of the error.
*
* <p>This will return false until at least one input value has been computed.
*
* @return True if the error is within the tolerance of the error.
*/
public boolean atGoal() {
return atSetpoint() && m_goal.equals(m_setpoint);
@@ -191,6 +197,8 @@ public class ProfiledPIDController implements Sendable {
* Returns true if the error is within the tolerance of the error.
*
* <p>This will return false until at least one input value has been computed.
*
* @return True if the error is within the tolerance of the error.
*/
public boolean atSetpoint() {
return m_controller.atSetpoint();
@@ -257,7 +265,11 @@ public class ProfiledPIDController implements Sendable {
return m_controller.getPositionError();
}
/** Returns the change in error per second. */
/**
* Returns the change in error per second.
*
* @return The change in error per second.
*/
public double getVelocityError() {
return m_controller.getVelocityError();
}
@@ -266,6 +278,7 @@ public class ProfiledPIDController implements Sendable {
* Returns the next output of the PID controller.
*
* @param measurement The current measurement of the process variable.
* @return The controller's next output.
*/
public double calculate(double measurement) {
if (m_controller.isContinuousInputEnabled()) {
@@ -294,6 +307,7 @@ public class ProfiledPIDController implements Sendable {
*
* @param measurement The current measurement of the process variable.
* @param goal The new goal of the controller.
* @return The controller's next output.
*/
public double calculate(double measurement, TrapezoidProfile.State goal) {
setGoal(goal);
@@ -305,6 +319,7 @@ public class ProfiledPIDController implements Sendable {
*
* @param measurement The current measurement of the process variable.
* @param goal The new goal of the controller.
* @return The controller's next output.
*/
public double calculate(double measurement, double goal) {
setGoal(goal);
@@ -317,6 +332,7 @@ public class ProfiledPIDController implements Sendable {
* @param measurement The current measurement of the process variable.
* @param goal The new goal of the controller.
* @param constraints Velocity and acceleration constraints for goal.
* @return The controller's next output.
*/
public double calculate(
double measurement, TrapezoidProfile.State goal, TrapezoidProfile.Constraints constraints) {

View File

@@ -120,6 +120,9 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
* <p>To pass multiple motors per side, use a {@link
* edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup}. If a motor needs to be inverted, do
* so before passing it in.
*
* @param leftMotor Left motor.
* @param rightMotor Right motor.
*/
public DifferentialDrive(SpeedController leftMotor, SpeedController rightMotor) {
requireNonNull(leftMotor, "Left motor cannot be null");
@@ -256,6 +259,7 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
* @param zRotation The robot's rotation rate around the Z axis [-1.0..1.0]. Clockwise is
* positive.
* @param squareInputs If set, decreases the input sensitivity at low speeds.
* @return Wheel speeds.
*/
@SuppressWarnings("ParameterName")
public static WheelSpeeds arcadeDriveIK(double xSpeed, double zRotation, boolean squareInputs) {
@@ -317,6 +321,7 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
* positive.
* @param allowTurnInPlace If set, overrides constant-curvature turning for turn-in-place
* maneuvers.
* @return Wheel speeds.
*/
@SuppressWarnings("ParameterName")
public static WheelSpeeds curvatureDriveIK(
@@ -352,6 +357,7 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable, AutoC
* @param rightSpeed The robot right side's speed along the X axis [-1.0..1.0]. Forward is
* positive.
* @param squareInputs If set, decreases the input sensitivity at low speeds.
* @return Wheel speeds.
*/
public static WheelSpeeds tankDriveIK(double leftSpeed, double rightSpeed, boolean squareInputs) {
leftSpeed = MathUtil.clamp(leftSpeed, -1.0, 1.0);

View File

@@ -240,6 +240,7 @@ public class KilloughDrive extends RobotDriveBase implements Sendable, AutoClose
* positive.
* @param gyroAngle The current angle reading from the gyro in degrees around the Z axis. Use this
* to implement field-oriented controls.
* @return Wheel speeds.
*/
@SuppressWarnings("ParameterName")
public WheelSpeeds driveCartesianIK(

View File

@@ -99,6 +99,11 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea
* Construct a MecanumDrive.
*
* <p>If a motor needs to be inverted, do so before passing it in.
*
* @param frontLeftMotor The motor on the front-left corner.
* @param rearLeftMotor The motor on the rear-left corner.
* @param frontRightMotor The motor on the front-right corner.
* @param rearRightMotor The motor on the rear-right corner.
*/
public MecanumDrive(
SpeedController frontLeftMotor,
@@ -214,6 +219,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea
* positive.
* @param gyroAngle The current angle reading from the gyro in degrees around the Z axis. Use this
* to implement field-oriented controls.
* @return Wheel speeds.
*/
@SuppressWarnings("ParameterName")
public static WheelSpeeds driveCartesianIK(

View File

@@ -82,6 +82,7 @@ public abstract class RobotDriveBase extends MotorSafety {
*
* @param value value to clip
* @param deadband range around zero
* @return The value after the deadband is applied.
*/
protected static double applyDeadband(double value, double deadband) {
if (Math.abs(value) > deadband) {
@@ -95,7 +96,11 @@ public abstract class RobotDriveBase extends MotorSafety {
}
}
/** Normalize all wheel speeds if the magnitude of any wheel is greater than 1.0. */
/**
* Normalize all wheel speeds if the magnitude of any wheel is greater than 1.0.
*
* @param wheelSpeeds List of wheel speeds to normalize.
*/
protected static void normalize(double[] wheelSpeeds) {
double maxMagnitude = Math.abs(wheelSpeeds[0]);
for (int i = 1; i < wheelSpeeds.length; i++) {

View File

@@ -38,12 +38,17 @@ public class Vector2d {
* Returns dot product of this vector with argument.
*
* @param vec Vector with which to perform dot product.
* @return Dot product of this vector with argument.
*/
public double dot(Vector2d vec) {
return x * vec.x + y * vec.y;
}
/** Returns magnitude of vector. */
/**
* Returns magnitude of vector.
*
* @return Magnitude of vector.
*/
public double magnitude() {
return Math.sqrt(x * x + y * y);
}
@@ -52,6 +57,7 @@ public class Vector2d {
* Returns scalar projection of this vector onto argument.
*
* @param vec Vector onto which to project this vector.
* @return scalar projection of this vector onto argument.
*/
public double scalarProject(Vector2d vec) {
return dot(vec) / vec.magnitude();

View File

@@ -57,12 +57,17 @@ public class LiveWindow {
}
/**
* Set the enabled state of 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. 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 around, etc.
* after a period of adjusting them in LiveWindow mode.
* Set the enabled state of LiveWindow.
*
* <p>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.
*
* <p>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
* around, etc. after a period of adjusting them in LiveWindow mode.
*
* @param enabled True to enable LiveWindow.
*/
public static synchronized void setEnabled(boolean enabled) {
if (liveWindowEnabled != enabled) {

View File

@@ -18,6 +18,7 @@ public class MotorControllerGroup implements MotorController, Sendable, AutoClos
/**
* Create a new MotorControllerGroup with the provided MotorControllers.
*
* @param motorController The first MotorController to add
* @param motorControllers The MotorControllers to add
*/
public MotorControllerGroup(

View File

@@ -26,7 +26,11 @@ import edu.wpi.first.wpilibj.PWM;
* </ul>
*/
public class PWMSparkMax extends PWMMotorController {
/** Common initialization code called by all constructors. */
/**
* Common initialization code called by all constructors.
*
* @param channel The PWM channel number. 0-9 are on-board, 10-19 are on the MXP port
*/
public PWMSparkMax(final int channel) {
super("PWMSparkMax", channel);

View File

@@ -11,6 +11,10 @@ package edu.wpi.first.wpilibj.shuffleboard;
* @see BuiltInWidgets the built-in widget types
*/
public interface LayoutType {
/** Gets the string type of the layout as defined by that layout in Shuffleboard. */
/**
* Gets the string type of the layout as defined by that layout in Shuffleboard.
*
* @return The string type of the layout.
*/
String getLayoutName();
}

View File

@@ -15,7 +15,11 @@ import java.util.function.Supplier;
/** Common interface for objects that can contain shuffleboard components. */
public interface ShuffleboardContainer extends ShuffleboardValue {
/** Gets the components that are direct children of this container. */
/**
* Gets the components that are direct children of this container.
*
* @return The components that are direct children of this container.
*/
List<ShuffleboardComponent<?>> getComponents();
/**

View File

@@ -8,7 +8,11 @@ import edu.wpi.first.networktables.NetworkTable;
interface ShuffleboardValue {
/** Gets the title of this Shuffleboard value. */
/**
* Gets the title of this Shuffleboard value.
*
* @return The title of this Shuffleboard value.
*/
String getTitle();
/**

View File

@@ -15,7 +15,11 @@ public final class SimpleWidget extends ShuffleboardWidget<SimpleWidget> {
super(parent, title);
}
/** Gets the NetworkTable entry that contains the data for this widget. */
/**
* Gets the NetworkTable entry that contains the data for this widget.
*
* @return The NetworkTable entry that contains the data for this widget.
*/
public NetworkTableEntry getEntry() {
if (m_entry == null) {
forceGenerate();

View File

@@ -11,6 +11,10 @@ package edu.wpi.first.wpilibj.shuffleboard;
* @see BuiltInWidgets the built-in widget types
*/
public interface WidgetType {
/** Gets the string type of the widget as defined by that widget in Shuffleboard. */
/**
* Gets the string type of the widget as defined by that widget in Shuffleboard.
*
* @return The string type of the widget.
*/
String getWidgetName();
}

View File

@@ -41,12 +41,20 @@ public class AnalogEncoderSim {
m_simPosition.set(turns);
}
/** Get the simulated position. */
/**
* Get the simulated position.
*
* @return The simulated position.
*/
public double getTurns() {
return m_simPosition.get();
}
/** Get the position as a {@link Rotation2d}. */
/**
* Get the position as a {@link Rotation2d}.
*
* @return The position as a {@link Rotation2d}.
*/
public Rotation2d getPosition() {
return Rotation2d.fromDegrees(getTurns() * 360.0);
}

View File

@@ -23,6 +23,10 @@ public class CallbackStore implements AutoCloseable {
/**
* <b>Note: This constructor is for simulation classes only. It should not be called by teams!</b>
*
* @param index TODO
* @param uid TODO
* @param ccf TODO
*/
public CallbackStore(int index, int uid, CancelCallbackFunc ccf) {
this.m_cancelType = kNormalCancel;
@@ -33,6 +37,11 @@ public class CallbackStore implements AutoCloseable {
/**
* <b>Note: This constructor is for simulation classes only. It should not be called by teams!</b>
*
* @param index TODO
* @param channel TODO
* @param uid TODO
* @param ccf TODO
*/
public CallbackStore(int index, int channel, int uid, CancelCallbackChannelFunc ccf) {
this.m_cancelType = kChannelCancel;
@@ -44,6 +53,9 @@ public class CallbackStore implements AutoCloseable {
/**
* <b>Note: This constructor is for simulation classes only. It should not be called by teams!</b>
*
* @param uid TODO
* @param ccf TODO
*/
public CallbackStore(int uid, CancelCallbackNoIndexFunc ccf) {
this.m_cancelType = kNoIndexCancel;

View File

@@ -187,12 +187,18 @@ public class DifferentialDrivetrainSim {
* Returns the direction the robot is pointing.
*
* <p>Note that this angle is counterclockwise-positive, while most gyros are clockwise positive.
*
* @return The direction the robot is pointing.
*/
public Rotation2d getHeading() {
return new Rotation2d(getOutput(State.kHeading));
}
/** Returns the current pose. */
/**
* Returns the current pose.
*
* @return The current pose.
*/
public Pose2d getPose() {
return new Pose2d(getOutput(State.kX), getOutput(State.kY), getHeading());
}
@@ -447,6 +453,7 @@ public class DifferentialDrivetrainSim {
* desired. Gyro standard deviations of 0.0001 radians, velocity standard deviations of 0.05
* m/s, and position measurement standard deviations of 0.005 meters are a reasonable starting
* point.
* @return A sim for the standard FRC kitbot.
*/
public static DifferentialDrivetrainSim createKitbotSim(
KitbotMotor motor,
@@ -475,6 +482,7 @@ public class DifferentialDrivetrainSim {
* desired. Gyro standard deviations of 0.0001 radians, velocity standard deviations of 0.05
* m/s, and position measurement standard deviations of 0.005 meters are a reasonable starting
* point.
* @return A sim for the standard FRC kitbot.
*/
@SuppressWarnings("ParameterName")
public static DifferentialDrivetrainSim createKitbotSim(

View File

@@ -33,7 +33,11 @@ public class DutyCycleEncoderSim {
m_simPosition.set(turns);
}
/** Set the position. */
/**
* Set the position.
*
* @param distance The position.
*/
public void setDistance(double distance) {
m_simPosition.set(distance / m_simDistancePerRotation.get());
}

View File

@@ -177,6 +177,7 @@ public class SimDeviceSim {
/**
* Register a callback to be run every time a value is changed on this device.
*
* @param value simulated value
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
@@ -197,6 +198,8 @@ public class SimDeviceSim {
* @param value simulated value
* @param callback callback
* @param initialNotify ignored (present for consistency)
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
*/
public CallbackStore registerValueResetCallback(
SimValue value, SimValueCallback callback, boolean initialNotify) {
@@ -219,6 +222,7 @@ public class SimDeviceSim {
/**
* Register a callback to be run every time a new {@link edu.wpi.first.hal.SimDevice} is created.
*
* @param prefix the prefix to filter sim devices
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
@@ -234,7 +238,9 @@ public class SimDeviceSim {
* Register a callback to be run every time a {@link edu.wpi.first.hal.SimDevice} is
* freed/destroyed.
*
* @param prefix the prefix to filter sim devices
* @param callback the callback
* @param initialNotify should the callback be run with the initial state
* @return the {@link CallbackStore} object associated with this callback. Save a reference to
* this object so GC doesn't cancel the callback.
*/

View File

@@ -69,6 +69,7 @@ public class Field2d implements Sendable {
/**
* Get or create a field object.
*
* @param name The field object's name.
* @return Field object
*/
public synchronized FieldObject2d getObject(String name) {

View File

@@ -24,7 +24,15 @@ public class MechanismLigament2d extends MechanismObject2d {
private double m_weight;
private NetworkTableEntry m_weightEntry;
/** Create a new ligament. */
/**
* Create a new ligament.
*
* @param name The ligament name.
* @param length The ligament length.
* @param angle The ligament angle.
* @param lineWidth The ligament's line width.
* @param color The ligament's color.
*/
public MechanismLigament2d(
String name, double length, double angle, double lineWidth, Color8Bit color) {
super(name);
@@ -34,7 +42,13 @@ public class MechanismLigament2d extends MechanismObject2d {
setLineWeight(lineWidth);
}
/** Create a new ligament with the default color (dark blue) and thickness (6). */
/**
* Create a new ligament with the default color (dark blue) and thickness (6).
*
* @param name The ligament's name.
* @param length The ligament's length.
* @param angle The ligament's angle relative to its parent.
*/
public MechanismLigament2d(String name, double length, double angle) {
this(name, length, angle, 10, new Color8Bit(235, 137, 52));
}

View File

@@ -35,6 +35,7 @@ public abstract class MechanismObject2d {
/**
* Append a Mechanism object that is based on this one.
*
* @param <T> The object type.
* @param object the object to add.
* @return the object given as a parameter, useful for variable assignments and call chaining.
* @throws UnsupportedOperationException if the object's name is already used - object names must

View File

@@ -42,6 +42,7 @@ public final class MechanismRoot2d {
/**
* Append a Mechanism object that is based on this one.
*
* @param <T> The object type.
* @param object the object to add.
* @return the object given as a parameter, useful for variable assignments and call chaining.
* @throws UnsupportedOperationException if the object's name is already used - object names must

View File

@@ -108,436 +108,436 @@ public class Color {
* FIRST Colors
*/
/** #1560BD. */
/** 0x1560BD. */
public static final Color kDenim = new Color(0.0823529412, 0.376470589, 0.7411764706);
/** #0066B3. */
/** 0x0066B3. */
public static final Color kFirstBlue = new Color(0.0, 0.4, 0.7019607844);
/** #ED1C24. */
/** 0xED1C24. */
public static final Color kFirstRed = new Color(0.9294117648, 0.1098039216, 0.1411764706);
/*
* Standard Colors
*/
/** #F0F8FF. */
/** 0xF0F8FF. */
public static final Color kAliceBlue = new Color(0.9411765f, 0.972549f, 1.0f);
/** #FAEBD7. */
/** 0xFAEBD7. */
public static final Color kAntiqueWhite = new Color(0.98039216f, 0.92156863f, 0.84313726f);
/** #00FFFF. */
/** 0x00FFFF. */
public static final Color kAqua = new Color(0.0f, 1.0f, 1.0f);
/** #7FFFD4. */
/** 0x7FFFD4. */
public static final Color kAquamarine = new Color(0.49803922f, 1.0f, 0.83137256f);
/** #F0FFFF. */
/** 0xF0FFFF. */
public static final Color kAzure = new Color(0.9411765f, 1.0f, 1.0f);
/** #F5F5DC. */
/** 0xF5F5DC. */
public static final Color kBeige = new Color(0.9607843f, 0.9607843f, 0.8627451f);
/** #FFE4C4. */
/** 0xFFE4C4. */
public static final Color kBisque = new Color(1.0f, 0.89411765f, 0.76862746f);
/** #000000. */
/** 0x000000. */
public static final Color kBlack = new Color(0.0f, 0.0f, 0.0f);
/** #FFEBCD. */
/** 0xFFEBCD. */
public static final Color kBlanchedAlmond = new Color(1.0f, 0.92156863f, 0.8039216f);
/** #0000FF. */
/** 0x0000FF. */
public static final Color kBlue = new Color(0.0f, 0.0f, 1.0f);
/** #8A2BE2. */
/** 0x8A2BE2. */
public static final Color kBlueViolet = new Color(0.5411765f, 0.16862746f, 0.8862745f);
/** #A52A2A. */
/** 0xA52A2A. */
public static final Color kBrown = new Color(0.64705884f, 0.16470589f, 0.16470589f);
/** #DEB887. */
/** 0xDEB887. */
public static final Color kBurlywood = new Color(0.87058824f, 0.72156864f, 0.5294118f);
/** #5F9EA0. */
/** 0x5F9EA0. */
public static final Color kCadetBlue = new Color(0.37254903f, 0.61960787f, 0.627451f);
/** #7FFF00. */
/** 0x7FFF00. */
public static final Color kChartreuse = new Color(0.49803922f, 1.0f, 0.0f);
/** #D2691E. */
/** 0xD2691E. */
public static final Color kChocolate = new Color(0.8235294f, 0.4117647f, 0.11764706f);
/** #FF7F50. */
/** 0xFF7F50. */
public static final Color kCoral = new Color(1.0f, 0.49803922f, 0.3137255f);
/** #6495ED. */
/** 0x6495ED. */
public static final Color kCornflowerBlue = new Color(0.39215687f, 0.58431375f, 0.92941177f);
/** #FFF8DC. */
/** 0xFFF8DC. */
public static final Color kCornsilk = new Color(1.0f, 0.972549f, 0.8627451f);
/** #DC143C. */
/** 0xDC143C. */
public static final Color kCrimson = new Color(0.8627451f, 0.078431375f, 0.23529412f);
/** #00FFFF. */
/** 0x00FFFF. */
public static final Color kCyan = new Color(0.0f, 1.0f, 1.0f);
/** #00008B. */
/** 0x00008B. */
public static final Color kDarkBlue = new Color(0.0f, 0.0f, 0.54509807f);
/** #008B8B. */
/** 0x008B8B. */
public static final Color kDarkCyan = new Color(0.0f, 0.54509807f, 0.54509807f);
/** #B8860B. */
/** 0xB8860B. */
public static final Color kDarkGoldenrod = new Color(0.72156864f, 0.5254902f, 0.043137256f);
/** #A9A9A9. */
/** 0xA9A9A9. */
public static final Color kDarkGray = new Color(0.6627451f, 0.6627451f, 0.6627451f);
/** #006400. */
/** 0x006400. */
public static final Color kDarkGreen = new Color(0.0f, 0.39215687f, 0.0f);
/** #BDB76B. */
/** 0xBDB76B. */
public static final Color kDarkKhaki = new Color(0.7411765f, 0.7176471f, 0.41960785f);
/** #8B008B. */
/** 0x8B008B. */
public static final Color kDarkMagenta = new Color(0.54509807f, 0.0f, 0.54509807f);
/** #556B2F. */
/** 0x556B2F. */
public static final Color kDarkOliveGreen = new Color(0.33333334f, 0.41960785f, 0.18431373f);
/** #FF8C00. */
/** 0xFF8C00. */
public static final Color kDarkOrange = new Color(1.0f, 0.54901963f, 0.0f);
/** #9932CC. */
/** 0x9932CC. */
public static final Color kDarkOrchid = new Color(0.6f, 0.19607843f, 0.8f);
/** #8B0000. */
/** 0x8B0000. */
public static final Color kDarkRed = new Color(0.54509807f, 0.0f, 0.0f);
/** #E9967A. */
/** 0xE9967A. */
public static final Color kDarkSalmon = new Color(0.9137255f, 0.5882353f, 0.47843137f);
/** #8FBC8F. */
/** 0x8FBC8F. */
public static final Color kDarkSeaGreen = new Color(0.56078434f, 0.7372549f, 0.56078434f);
/** #483D8B. */
/** 0x483D8B. */
public static final Color kDarkSlateBlue = new Color(0.28235295f, 0.23921569f, 0.54509807f);
/** #2F4F4F. */
/** 0x2F4F4F. */
public static final Color kDarkSlateGray = new Color(0.18431373f, 0.30980393f, 0.30980393f);
/** #00CED1. */
/** 0x00CED1. */
public static final Color kDarkTurquoise = new Color(0.0f, 0.80784315f, 0.81960785f);
/** #9400D3. */
/** 0x9400D3. */
public static final Color kDarkViolet = new Color(0.5803922f, 0.0f, 0.827451f);
/** #FF1493. */
/** 0xFF1493. */
public static final Color kDeepPink = new Color(1.0f, 0.078431375f, 0.5764706f);
/** #00BFFF. */
/** 0x00BFFF. */
public static final Color kDeepSkyBlue = new Color(0.0f, 0.7490196f, 1.0f);
/** #696969. */
/** 0x696969. */
public static final Color kDimGray = new Color(0.4117647f, 0.4117647f, 0.4117647f);
/** #1E90FF. */
/** 0x1E90FF. */
public static final Color kDodgerBlue = new Color(0.11764706f, 0.5647059f, 1.0f);
/** #B22222. */
/** 0xB22222. */
public static final Color kFirebrick = new Color(0.69803923f, 0.13333334f, 0.13333334f);
/** #FFFAF0. */
/** 0xFFFAF0. */
public static final Color kFloralWhite = new Color(1.0f, 0.98039216f, 0.9411765f);
/** #228B22. */
/** 0x228B22. */
public static final Color kForestGreen = new Color(0.13333334f, 0.54509807f, 0.13333334f);
/** #FF00FF. */
/** 0xFF00FF. */
public static final Color kFuchsia = new Color(1.0f, 0.0f, 1.0f);
/** #DCDCDC. */
/** 0xDCDCDC. */
public static final Color kGainsboro = new Color(0.8627451f, 0.8627451f, 0.8627451f);
/** #F8F8FF. */
/** 0xF8F8FF. */
public static final Color kGhostWhite = new Color(0.972549f, 0.972549f, 1.0f);
/** #FFD700. */
/** 0xFFD700. */
public static final Color kGold = new Color(1.0f, 0.84313726f, 0.0f);
/** #DAA520. */
/** 0xDAA520. */
public static final Color kGoldenrod = new Color(0.85490197f, 0.64705884f, 0.1254902f);
/** #808080. */
/** 0x808080. */
public static final Color kGray = new Color(0.5019608f, 0.5019608f, 0.5019608f);
/** #008000. */
/** 0x008000. */
public static final Color kGreen = new Color(0.0f, 0.5019608f, 0.0f);
/** #ADFF2F. */
/** 0xADFF2F. */
public static final Color kGreenYellow = new Color(0.6784314f, 1.0f, 0.18431373f);
/** #F0FFF0. */
/** 0xF0FFF0. */
public static final Color kHoneydew = new Color(0.9411765f, 1.0f, 0.9411765f);
/** #FF69B4. */
/** 0xFF69B4. */
public static final Color kHotPink = new Color(1.0f, 0.4117647f, 0.7058824f);
/** #CD5C5C. */
/** 0xCD5C5C. */
public static final Color kIndianRed = new Color(0.8039216f, 0.36078432f, 0.36078432f);
/** #4B0082. */
/** 0x4B0082. */
public static final Color kIndigo = new Color(0.29411766f, 0.0f, 0.50980395f);
/** #FFFFF0. */
/** 0xFFFFF0. */
public static final Color kIvory = new Color(1.0f, 1.0f, 0.9411765f);
/** #F0E68C. */
/** 0xF0E68C. */
public static final Color kKhaki = new Color(0.9411765f, 0.9019608f, 0.54901963f);
/** #E6E6FA. */
/** 0xE6E6FA. */
public static final Color kLavender = new Color(0.9019608f, 0.9019608f, 0.98039216f);
/** #FFF0F5. */
/** 0xFFF0F5. */
public static final Color kLavenderBlush = new Color(1.0f, 0.9411765f, 0.9607843f);
/** #7CFC00. */
/** 0x7CFC00. */
public static final Color kLawnGreen = new Color(0.4862745f, 0.9882353f, 0.0f);
/** #FFFACD. */
/** 0xFFFACD. */
public static final Color kLemonChiffon = new Color(1.0f, 0.98039216f, 0.8039216f);
/** #ADD8E6. */
/** 0xADD8E6. */
public static final Color kLightBlue = new Color(0.6784314f, 0.84705883f, 0.9019608f);
/** #F08080. */
/** 0xF08080. */
public static final Color kLightCoral = new Color(0.9411765f, 0.5019608f, 0.5019608f);
/** #E0FFFF. */
/** 0xE0FFFF. */
public static final Color kLightCyan = new Color(0.8784314f, 1.0f, 1.0f);
/** #FAFAD2. */
/** 0xFAFAD2. */
public static final Color kLightGoldenrodYellow = new Color(0.98039216f, 0.98039216f, 0.8235294f);
/** #D3D3D3. */
/** 0xD3D3D3. */
public static final Color kLightGray = new Color(0.827451f, 0.827451f, 0.827451f);
/** #90EE90. */
/** 0x90EE90. */
public static final Color kLightGreen = new Color(0.5647059f, 0.93333334f, 0.5647059f);
/** #FFB6C1. */
/** 0xFFB6C1. */
public static final Color kLightPink = new Color(1.0f, 0.7137255f, 0.75686276f);
/** #FFA07A. */
/** 0xFFA07A. */
public static final Color kLightSalmon = new Color(1.0f, 0.627451f, 0.47843137f);
/** #20B2AA. */
/** 0x20B2AA. */
public static final Color kLightSeaGreen = new Color(0.1254902f, 0.69803923f, 0.6666667f);
/** #87CEFA. */
/** 0x87CEFA. */
public static final Color kLightSkyBlue = new Color(0.5294118f, 0.80784315f, 0.98039216f);
/** #778899. */
/** 0x778899. */
public static final Color kLightSlateGray = new Color(0.46666667f, 0.53333336f, 0.6f);
/** #B0C4DE. */
/** 0xB0C4DE. */
public static final Color kLightSteelBlue = new Color(0.6901961f, 0.76862746f, 0.87058824f);
/** #FFFFE0. */
/** 0xFFFFE0. */
public static final Color kLightYellow = new Color(1.0f, 1.0f, 0.8784314f);
/** #00FF00. */
/** 0x00FF00. */
public static final Color kLime = new Color(0.0f, 1.0f, 0.0f);
/** #32CD32. */
/** 0x32CD32. */
public static final Color kLimeGreen = new Color(0.19607843f, 0.8039216f, 0.19607843f);
/** #FAF0E6. */
/** 0xFAF0E6. */
public static final Color kLinen = new Color(0.98039216f, 0.9411765f, 0.9019608f);
/** #FF00FF. */
/** 0xFF00FF. */
public static final Color kMagenta = new Color(1.0f, 0.0f, 1.0f);
/** #800000. */
/** 0x800000. */
public static final Color kMaroon = new Color(0.5019608f, 0.0f, 0.0f);
/** #66CDAA. */
/** 0x66CDAA. */
public static final Color kMediumAquamarine = new Color(0.4f, 0.8039216f, 0.6666667f);
/** #0000CD. */
/** 0x0000CD. */
public static final Color kMediumBlue = new Color(0.0f, 0.0f, 0.8039216f);
/** #BA55D3. */
/** 0xBA55D3. */
public static final Color kMediumOrchid = new Color(0.7294118f, 0.33333334f, 0.827451f);
/** #9370DB. */
/** 0x9370DB. */
public static final Color kMediumPurple = new Color(0.5764706f, 0.4392157f, 0.85882354f);
/** #3CB371. */
/** 0x3CB371. */
public static final Color kMediumSeaGreen = new Color(0.23529412f, 0.7019608f, 0.44313726f);
/** #7B68EE. */
/** 0x7B68EE. */
public static final Color kMediumSlateBlue = new Color(0.48235294f, 0.40784314f, 0.93333334f);
/** #00FA9A. */
/** 0x00FA9A. */
public static final Color kMediumSpringGreen = new Color(0.0f, 0.98039216f, 0.6039216f);
/** #48D1CC. */
/** 0x48D1CC. */
public static final Color kMediumTurquoise = new Color(0.28235295f, 0.81960785f, 0.8f);
/** #C71585. */
/** 0xC71585. */
public static final Color kMediumVioletRed = new Color(0.78039217f, 0.08235294f, 0.52156866f);
/** #191970. */
/** 0x191970. */
public static final Color kMidnightBlue = new Color(0.09803922f, 0.09803922f, 0.4392157f);
/** #F5FFFA. */
/** 0xF5FFFA. */
public static final Color kMintcream = new Color(0.9607843f, 1.0f, 0.98039216f);
/** #FFE4E1. */
/** 0xFFE4E1. */
public static final Color kMistyRose = new Color(1.0f, 0.89411765f, 0.88235295f);
/** #FFE4B5. */
/** 0xFFE4B5. */
public static final Color kMoccasin = new Color(1.0f, 0.89411765f, 0.70980394f);
/** #FFDEAD. */
/** 0xFFDEAD. */
public static final Color kNavajoWhite = new Color(1.0f, 0.87058824f, 0.6784314f);
/** #000080. */
/** 0x000080. */
public static final Color kNavy = new Color(0.0f, 0.0f, 0.5019608f);
/** #FDF5E6. */
/** 0xFDF5E6. */
public static final Color kOldLace = new Color(0.99215686f, 0.9607843f, 0.9019608f);
/** #808000. */
/** 0x808000. */
public static final Color kOlive = new Color(0.5019608f, 0.5019608f, 0.0f);
/** #6B8E23. */
/** 0x6B8E23. */
public static final Color kOliveDrab = new Color(0.41960785f, 0.5568628f, 0.13725491f);
/** #FFA500. */
/** 0xFFA500. */
public static final Color kOrange = new Color(1.0f, 0.64705884f, 0.0f);
/** #FF4500. */
/** 0xFF4500. */
public static final Color kOrangeRed = new Color(1.0f, 0.27058825f, 0.0f);
/** #DA70D6. */
/** 0xDA70D6. */
public static final Color kOrchid = new Color(0.85490197f, 0.4392157f, 0.8392157f);
/** #EEE8AA. */
/** 0xEEE8AA. */
public static final Color kPaleGoldenrod = new Color(0.93333334f, 0.9098039f, 0.6666667f);
/** #98FB98. */
/** 0x98FB98. */
public static final Color kPaleGreen = new Color(0.59607846f, 0.9843137f, 0.59607846f);
/** #AFEEEE. */
/** 0xAFEEEE. */
public static final Color kPaleTurquoise = new Color(0.6862745f, 0.93333334f, 0.93333334f);
/** #DB7093. */
/** 0xDB7093. */
public static final Color kPaleVioletRed = new Color(0.85882354f, 0.4392157f, 0.5764706f);
/** #FFEFD5. */
/** 0xFFEFD5. */
public static final Color kPapayaWhip = new Color(1.0f, 0.9372549f, 0.8352941f);
/** #FFDAB9. */
/** 0xFFDAB9. */
public static final Color kPeachPuff = new Color(1.0f, 0.85490197f, 0.7254902f);
/** #CD853F. */
/** 0xCD853F. */
public static final Color kPeru = new Color(0.8039216f, 0.52156866f, 0.24705882f);
/** #FFC0CB. */
/** 0xFFC0CB. */
public static final Color kPink = new Color(1.0f, 0.7529412f, 0.79607844f);
/** #DDA0DD. */
/** 0xDDA0DD. */
public static final Color kPlum = new Color(0.8666667f, 0.627451f, 0.8666667f);
/** #B0E0E6. */
/** 0xB0E0E6. */
public static final Color kPowderBlue = new Color(0.6901961f, 0.8784314f, 0.9019608f);
/** #800080. */
/** 0x800080. */
public static final Color kPurple = new Color(0.5019608f, 0.0f, 0.5019608f);
/** #FF0000. */
/** 0xFF0000. */
public static final Color kRed = new Color(1.0f, 0.0f, 0.0f);
/** #BC8F8F. */
/** 0xBC8F8F. */
public static final Color kRosyBrown = new Color(0.7372549f, 0.56078434f, 0.56078434f);
/** #4169E1. */
/** 0x4169E1. */
public static final Color kRoyalBlue = new Color(0.25490198f, 0.4117647f, 0.88235295f);
/** #8B4513. */
/** 0x8B4513. */
public static final Color kSaddleBrown = new Color(0.54509807f, 0.27058825f, 0.07450981f);
/** #FA8072. */
/** 0xFA8072. */
public static final Color kSalmon = new Color(0.98039216f, 0.5019608f, 0.44705883f);
/** #F4A460. */
/** 0xF4A460. */
public static final Color kSandyBrown = new Color(0.95686275f, 0.6431373f, 0.3764706f);
/** #2E8B57. */
/** 0x2E8B57. */
public static final Color kSeaGreen = new Color(0.18039216f, 0.54509807f, 0.34117648f);
/** #FFF5EE. */
/** 0xFFF5EE. */
public static final Color kSeashell = new Color(1.0f, 0.9607843f, 0.93333334f);
/** #A0522D. */
/** 0xA0522D. */
public static final Color kSienna = new Color(0.627451f, 0.32156864f, 0.1764706f);
/** #C0C0C0. */
/** 0xC0C0C0. */
public static final Color kSilver = new Color(0.7529412f, 0.7529412f, 0.7529412f);
/** #87CEEB. */
/** 0x87CEEB. */
public static final Color kSkyBlue = new Color(0.5294118f, 0.80784315f, 0.92156863f);
/** #6A5ACD. */
/** 0x6A5ACD. */
public static final Color kSlateBlue = new Color(0.41568628f, 0.3529412f, 0.8039216f);
/** #708090. */
/** 0x708090. */
public static final Color kSlateGray = new Color(0.4392157f, 0.5019608f, 0.5647059f);
/** #FFFAFA. */
/** 0xFFFAFA. */
public static final Color kSnow = new Color(1.0f, 0.98039216f, 0.98039216f);
/** #00FF7F. */
/** 0x00FF7F. */
public static final Color kSpringGreen = new Color(0.0f, 1.0f, 0.49803922f);
/** #4682B4. */
/** 0x4682B4. */
public static final Color kSteelBlue = new Color(0.27450982f, 0.50980395f, 0.7058824f);
/** #D2B48C. */
/** 0xD2B48C. */
public static final Color kTan = new Color(0.8235294f, 0.7058824f, 0.54901963f);
/** #008080. */
/** 0x008080. */
public static final Color kTeal = new Color(0.0f, 0.5019608f, 0.5019608f);
/** #D8BFD8. */
/** 0xD8BFD8. */
public static final Color kThistle = new Color(0.84705883f, 0.7490196f, 0.84705883f);
/** #FF6347. */
/** 0xFF6347. */
public static final Color kTomato = new Color(1.0f, 0.3882353f, 0.2784314f);
/** #40E0D0. */
/** 0x40E0D0. */
public static final Color kTurquoise = new Color(0.2509804f, 0.8784314f, 0.8156863f);
/** #EE82EE. */
/** 0xEE82EE. */
public static final Color kViolet = new Color(0.93333334f, 0.50980395f, 0.93333334f);
/** #F5DEB3. */
/** 0xF5DEB3. */
public static final Color kWheat = new Color(0.9607843f, 0.87058824f, 0.7019608f);
/** #FFFFFF. */
/** 0xFFFFFF. */
public static final Color kWhite = new Color(1.0f, 1.0f, 1.0f);
/** #F5F5F5. */
/** 0xF5F5F5. */
public static final Color kWhiteSmoke = new Color(0.9607843f, 0.9607843f, 0.9607843f);
/** #FFFF00. */
/** 0xFFFF00. */
public static final Color kYellow = new Color(1.0f, 1.0f, 0.0f);
/** #9ACD32. */
/** 0x9ACD32. */
public static final Color kYellowGreen = new Color(0.6039216f, 0.8039216f, 0.19607843f);
}

View File

@@ -17,9 +17,11 @@ public final class ErrorMessages {
* Requires that a parameter of a method not be null; prints an error message with helpful
* debugging instructions if the parameter is null.
*
* @param <T> Type of object.
* @param obj The parameter that must not be null.
* @param paramName The name of the parameter.
* @param methodName The name of the method.
* @return The object parameter confirmed not to be null.
*/
public static <T> T requireNonNullParam(T obj, String paramName, String methodName) {
return requireNonNull(

View File

@@ -19,6 +19,8 @@ public interface VisionPipeline {
/**
* Processes the image input and sets the result objects. Implementations should make these
* objects accessible.
*
* @param image The image to process.
*/
void process(Mat image);
}