Spelling and grammar cleanups (#4849)

This commit is contained in:
Sriman Achanta
2022-12-26 14:32:13 -05:00
committed by GitHub
parent 176fddeb4c
commit 92149efa11
110 changed files with 317 additions and 319 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -42,7 +42,7 @@ public class AddressableLED implements AutoCloseable {
/**
* Sets the length of the LED strip.
*
* <p>Calling this is an expensive call, so its best to call it once, then just update data.
* <p>Calling this is an expensive call, so it's best to call it once, then just update data.
*
* <p>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.
*
* <p>If the output is enabled, this will start writing the next data cycle. It is safe to call,
* even while output is enabled.

View File

@@ -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
*/

View File

@@ -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.
*
* <p>Volts = ((LSB_Weight * 1e-9) * raw) - (Offset * 1e-9)
*

View File

@@ -23,8 +23,8 @@ public class AnalogPotentiometer implements Sendable, AutoCloseable {
* AnalogPotentiometer constructor.
*
* <p>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.
*
* <p>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.
*
* <p>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.
*
* <p>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.

View File

@@ -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.
*
* <p>The InWindow output indicates whether or not the analog signal is inside the range defined by
* the limits.
* <p>The InWindow output indicates whether the analog signal is inside the range defined by the
* limits.
*
* <p>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

View File

@@ -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.

View File

@@ -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.
*/

View File

@@ -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.
*
* <p>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),

View File

@@ -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 {

View File

@@ -138,7 +138,7 @@ public class DigitalOutput extends DigitalSource implements Sendable {
*
* <p>Allocate one of the 6 DO PWM generator resources.
*
* <p>Supply the initial duty-cycle to output so as to avoid a glitch when first starting.
* <p>Supply the initial duty-cycle to output in order to avoid a glitch when first starting.
*
* <p>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.

View File

@@ -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);

View File

@@ -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
*/

View File

@@ -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 {
*
* <p>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.
*
* <p>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.
*
* <p>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
*
* <p>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
*
* <p>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.
*
* <p>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.
*
* <p>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.
*
* <p>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.
*
* <p>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.
*
* <p>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) {

View File

@@ -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()) {

View File

@@ -147,7 +147,7 @@ public class GenericHID {
/**
* Get the angle in degrees of a POV on the HID.
*
* <p>The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90,
* <p>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.
*
* <p>The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90,
* <p>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.
*
* <p>The POV angles start at 0 in the up direction, and increase clockwise (eg right is 90,
* <p>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);

View File

@@ -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);
}

View File

@@ -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

View File

@@ -159,7 +159,7 @@ public class Relay extends MotorSafety implements Sendable, AutoCloseable {
* <p>When set to kBothDirections, the relay can be set to any of the four states: 0v-0v, 12v-0v,
* 0v-12v, 12v-12v
*
* <p>When set to kForwardOnly or kReverseOnly, you can specify the constant for the direction or
* <p>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.

View File

@@ -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.
*
* <p><b>WARNING:</b> 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.
*/

View File

@@ -137,14 +137,14 @@ public abstract class RobotBase implements AutoCloseable {
* completion before Autonomous is entered.
*
* <p>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");

View File

@@ -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.

View File

@@ -164,9 +164,8 @@ public class SerialPort implements AutoCloseable {
/**
* Enable termination and specify the termination character.
*
* <p>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.
* <p>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'
*
* <p>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.
* <p>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.
*
* <p>The default terminator is '\n'
*/
@@ -268,7 +266,7 @@ public class SerialPort implements AutoCloseable {
* <p>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);

View File

@@ -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);

View File

@@ -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.
*
* <p>When in Automatic mode, all sensors will fire in round robin, waiting a set time between
* <p>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

View File

@@ -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.
*/

View File

@@ -135,7 +135,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable, AutoClosea
* Drive method for Mecanum platform.
*
* <p>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.
*
* <p>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.
*
* <p>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.
*
* <p>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.
*
* <p>Angles are measured clockwise from the positive X axis. The robot's speed is independent
* from its angle or rotation rate.
* <p>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.

View File

@@ -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();

View File

@@ -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();

View File

@@ -84,7 +84,7 @@ public final class 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.
* registered components and re-enable 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

View File

@@ -13,7 +13,7 @@
utility functions like timing and field management. The library is designed
to:
<ul>
<li>Deal with all the low level interfacing to these components so you
<li>Deal with all the low level interfacing to these components, so you
can concentrate on solving this year's "robot problem". This is a
philosophical decision to let you focus on the higher-level design of
your robot rather than deal with the details of the processor and the

View File

@@ -473,7 +473,7 @@ public enum BuiltInWidgets implements WidgetType {
*/
kCameraStream("Camera Stream"),
/**
* Displays a field2d object.<br>
* Displays a Field2d object.<br>
* Supported types:
*
* <ul>

View File

@@ -32,7 +32,7 @@ public class DIOSim {
}
/**
* Constructs from an digital I/O channel number.
* Constructs from a digital I/O channel number.
*
* @param channel Channel number
*/

View File

@@ -118,7 +118,7 @@ public class GenericHIDSim {
}
/**
* Set the type of an axis.
* Set the type of the provided axis channel.
*
* @param axis the axis
* @param type the type

View File

@@ -69,7 +69,7 @@ public class PS4ControllerSim extends GenericHIDSim {
}
/**
* Change the L2 axis axis value of the controller.
* Change the L2 axis value of the controller.
*
* @param value the new value
*/

View File

@@ -64,7 +64,7 @@ public class FieldObject2d implements AutoCloseable {
}
/**
* Set multiple poses from an list of Pose objects. The total number of poses is limited to 85.
* Set multiple poses from a list of Pose objects. The total number of poses is limited to 85.
*
* @param poses list of 2D poses
*/
@@ -77,7 +77,7 @@ public class FieldObject2d implements AutoCloseable {
}
/**
* Set multiple poses from an list of Pose objects. The total number of poses is limited to 85.
* Set multiple poses from a list of Pose objects. The total number of poses is limited to 85.
*
* @param poses list of 2D poses
*/

View File

@@ -252,7 +252,7 @@ public class SendableBuilderImpl implements NTSendableBuilder {
}
/**
* Set a flag indicating if this sendable should be treated as an actuator. By default this flag
* Set a flag indicating if this sendable should be treated as an actuator. By default, this flag
* is false.
*
* @param value true if actuator, false if not

View File

@@ -43,7 +43,7 @@ public class SendableChooser<V> implements NTSendable, AutoCloseable {
private static final String OPTIONS = "options";
/** The key for the instance number. */
private static final String INSTANCE = ".instance";
/** A map linking strings to the objects the represent. */
/** A map linking strings to the objects they represent. */
private final Map<String, V> m_map = new LinkedHashMap<>();
private String m_defaultChoice = "";

View File

@@ -77,7 +77,7 @@ public final class SmartDashboard {
}
/**
* Maps the specified key (where the key is the name of the {@link Sendable} to the specified
* Maps the specified key (where the key is the name of the {@link Sendable}) to the specified
* value in this table. The value can be retrieved by calling the get method with a key that is
* equal to the original key.
*