mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Fix spelling typos (#595)
This commit is contained in:
committed by
Peter Johnson
parent
9945a5b3c6
commit
b65447b6f5
@@ -18,7 +18,7 @@ public class AccumulatorResult {
|
||||
@SuppressWarnings("MemberName")
|
||||
public long value;
|
||||
/**
|
||||
* The number of sample vaule was accumulated over.
|
||||
* The number of sample value was accumulated over.
|
||||
*/
|
||||
@SuppressWarnings("MemberName")
|
||||
public long count;
|
||||
|
||||
@@ -34,7 +34,7 @@ import edu.wpi.first.wpilibj.util.AllocationException;
|
||||
public class AnalogInput extends SensorBase implements PIDSource, LiveWindowSendable {
|
||||
|
||||
private static final int kAccumulatorSlot = 1;
|
||||
int m_port; // explicit no modifier, private and package accessable.
|
||||
int m_port; // explicit no modifier, private and package accessible.
|
||||
private int m_channel;
|
||||
private static final int[] kAccumulatorChannels = {0, 1};
|
||||
private long m_accumulatorOffset;
|
||||
|
||||
@@ -127,7 +127,7 @@ public class AnalogTrigger {
|
||||
* point average rejection filter. This is designed to help with 360 degree pot applications for
|
||||
* the period where the pot crosses through zero.
|
||||
*
|
||||
* @param useFilteredValue true to use a filterd value, false otherwise
|
||||
* @param useFilteredValue true to use a filtered value, false otherwise
|
||||
*/
|
||||
public void setFiltered(boolean useFilteredValue) {
|
||||
AnalogJNI.setAnalogTriggerFiltered(m_port, useFilteredValue);
|
||||
|
||||
@@ -31,7 +31,7 @@ import static java.util.Objects.requireNonNull;
|
||||
* of a sensor and can be routed to an up / down counter or to interrupts. Because the outputs
|
||||
* generate a pulse, they cannot be read directly. To help ensure that a rollover condition is not
|
||||
* missed, there is an average rejection filter available that operates on the upper 8 bits of a 12
|
||||
* bit number and selects the nearest outlyer of 3 samples. This will reject a sample that is (due
|
||||
* bit number and selects the nearest outlier of 3 samples. This will reject a sample that is (due
|
||||
* to averaging or sampling) errantly between the two limits. This filter will fail if more than one
|
||||
* sample in a row is errantly in between the two limits. You may see this problem if attempting to
|
||||
* use this feature with a mechanical rollover sensor, such as a 360 degree no-stop potentiometer
|
||||
|
||||
@@ -130,7 +130,7 @@ public interface CANSpeedController extends SpeedController, PIDInterface, LiveW
|
||||
/**
|
||||
* Set the maximum rate of change of the output voltage.
|
||||
*
|
||||
* @param rampRate the maximum rate of change of the votlage, in Volts / sec.
|
||||
* @param rampRate the maximum rate of change of the voltage, in Volts / sec.
|
||||
*/
|
||||
void setVoltageRampRate(double rampRate);
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ public class Counter extends SensorBase implements CounterBase, LiveWindowSendab
|
||||
requireNonNull(downSource, "Down Source given was null");
|
||||
|
||||
if (encodingType != EncodingType.k1X && encodingType != EncodingType.k2X) {
|
||||
throw new RuntimeException("Counters only support 1X and 2X quadreature decoding!");
|
||||
throw new RuntimeException("Counters only support 1X and 2X quadrature decoding!");
|
||||
}
|
||||
|
||||
setUpSource(upSource);
|
||||
|
||||
@@ -57,7 +57,7 @@ public interface CounterBase {
|
||||
/**
|
||||
* Get the time between the last two edges counted.
|
||||
*
|
||||
* @return the time beteween the last two ticks in seconds
|
||||
* @return the time between the last two ticks in seconds
|
||||
*/
|
||||
double getPeriod();
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ public class DigitalOutput extends DigitalSource implements LiveWindowSendable {
|
||||
*
|
||||
* <p>The valid range is from 0.6 Hz to 19 kHz. The frequency resolution is logarithmic.
|
||||
*
|
||||
* <p>There is only one PWM frequency for all channnels.
|
||||
* <p>There is only one PWM frequency for all channels.
|
||||
*
|
||||
* @param rate The frequency to output all digital output PWM signals.
|
||||
*/
|
||||
|
||||
@@ -542,7 +542,7 @@ public class DriverStation implements RobotState.Interface {
|
||||
|
||||
/**
|
||||
* Gets a value indicating whether the FPGA outputs are enabled. The outputs may be disabled if
|
||||
* the robot is disabled or e-stopped, the watdhog has expired, or if the roboRIO browns out.
|
||||
* the robot is disabled or e-stopped, the watchdog has expired, or if the roboRIO browns out.
|
||||
*
|
||||
* @return True if the FPGA outputs are enabled.
|
||||
*/
|
||||
|
||||
@@ -73,12 +73,12 @@ public class GearTooth extends Counter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a digital input. This should be used when sharing digial
|
||||
* Construct a GearTooth sensor given a digital input. This should be used when sharing digital
|
||||
* inputs.
|
||||
*
|
||||
* <p>No direction sensing is assumed.
|
||||
*
|
||||
* @param source An object that fully descibes the input that the sensor is connected to.
|
||||
* @param source An object that fully describes the input that the sensor is connected to.
|
||||
*/
|
||||
public GearTooth(DigitalSource source) {
|
||||
this(source, false);
|
||||
|
||||
@@ -78,7 +78,7 @@ public abstract class InterruptableSensorBase extends SensorBase {
|
||||
assert m_interrupt != 0;
|
||||
|
||||
InterruptJNI.requestInterrupts(m_interrupt, getPortHandleForRouting(),
|
||||
getAnalogTriggerTypeForRouting());
|
||||
getAnalogTriggerTypeForRouting());
|
||||
setUpSourceEdge(true, false);
|
||||
InterruptJNI.attachInterruptHandler(m_interrupt, handler.m_function,
|
||||
handler.overridableParameter());
|
||||
@@ -99,7 +99,7 @@ public abstract class InterruptableSensorBase extends SensorBase {
|
||||
assert m_interrupt != 0;
|
||||
|
||||
InterruptJNI.requestInterrupts(m_interrupt, getPortHandleForRouting(),
|
||||
getAnalogTriggerTypeForRouting());
|
||||
getAnalogTriggerTypeForRouting());
|
||||
setUpSourceEdge(true, false);
|
||||
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public class Joystick extends JoystickBase {
|
||||
/**
|
||||
* For the current joystick, return the axis determined by the argument.
|
||||
*
|
||||
* <p>This is for cases where the joystick axis is returned programatically, otherwise one of the
|
||||
* <p>This is for cases where the joystick axis is returned programmatically, otherwise one of the
|
||||
* previous functions would be preferable (for example getX()).
|
||||
*
|
||||
* @param axis The axis to read.
|
||||
@@ -303,8 +303,6 @@ public class Joystick extends JoystickBase {
|
||||
/**
|
||||
* Get the direction of the vector formed by the joystick and its origin in degrees.
|
||||
*
|
||||
* <p>Uses acos(-1) to represent Pi due to absence of readily accessable Pi constant in C++
|
||||
*
|
||||
* @return The direction of the vector in degrees
|
||||
*/
|
||||
public double getDirectionDegrees() {
|
||||
|
||||
@@ -103,7 +103,7 @@ public final class MotorSafetyHelper {
|
||||
|
||||
/**
|
||||
* Return the state of the motor safety enabled flag Return if the motor safety is currently
|
||||
* enabled for this devicce.
|
||||
* enabled for this device.
|
||||
*
|
||||
* @return True if motor safety is enforced for this device
|
||||
*/
|
||||
|
||||
@@ -130,9 +130,9 @@ public class Notifier {
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop timer events from occuring. Stop any repeating timer events from occuring. This will also
|
||||
* remove any single notification events from the queue. If a timer-based call to the registered
|
||||
* handler is in progress, this function will block until the handler call is complete.
|
||||
* Stop timer events from occurring. Stop any repeating timer events from occurring. This will
|
||||
* also remove any single notification events from the queue. If a timer-based call to the
|
||||
* registered handler is in progress, this function will block until the handler call is complete.
|
||||
*/
|
||||
public void stop() {
|
||||
m_process.stop();
|
||||
|
||||
@@ -12,7 +12,7 @@ import edu.wpi.first.wpilibj.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 indicies that have an lower and
|
||||
* allocated arbitrary resources in the program. Resources are just indices that have an 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.
|
||||
@@ -43,7 +43,7 @@ public final class Resource {
|
||||
|
||||
/**
|
||||
* Allocate storage for a new instance of Resource. Allocate a bool array of values that will get
|
||||
* initialized to indicate that no resources have been allocated yet. The indicies of the
|
||||
* initialized to indicate that no resources have been allocated yet. The indices of the
|
||||
* resources are 0..size-1.
|
||||
*
|
||||
* @param size The number of blocks to allocate
|
||||
|
||||
@@ -420,7 +420,7 @@ public class RobotDrive implements MotorSafety {
|
||||
* Arcade drive implements single stick driving. This function lets you directly provide
|
||||
* joystick values from any source.
|
||||
*
|
||||
* @param moveValue The value to use for fowards/backwards
|
||||
* @param moveValue The value to use for forwards/backwards
|
||||
* @param rotateValue The value to use for the rotate right/left
|
||||
*/
|
||||
public void arcadeDrive(double moveValue, double rotateValue) {
|
||||
@@ -457,7 +457,7 @@ public class RobotDrive implements MotorSafety {
|
||||
double yIn = y;
|
||||
// Negate y for the joystick.
|
||||
yIn = -yIn;
|
||||
// Compenstate for gyro angle.
|
||||
// Compensate for gyro angle.
|
||||
double[] rotated = rotateVector(xIn, yIn, gyroAngle);
|
||||
xIn = rotated[0];
|
||||
yIn = rotated[1];
|
||||
@@ -487,10 +487,10 @@ public class RobotDrive implements MotorSafety {
|
||||
* top, the roller axles should form an X across the robot.
|
||||
*
|
||||
* @param magnitude The speed that the robot should drive in a given direction.
|
||||
* @param direction The direction the robot should drive in degrees. The direction and maginitute
|
||||
* @param direction The direction the robot should drive in degrees. The direction and magnitude
|
||||
* are independent of the rotation rate.
|
||||
* @param rotation The rate of rotation for the robot that is completely independent of the
|
||||
* magnitute or direction. [-1.0..1.0]
|
||||
* magnitude or direction. [-1.0..1.0]
|
||||
*/
|
||||
public void mecanumDrive_Polar(double magnitude, double direction, double rotation) {
|
||||
if (!kMecanumPolar_Reported) {
|
||||
@@ -526,7 +526,7 @@ public class RobotDrive implements MotorSafety {
|
||||
/**
|
||||
* Holonomic Drive method for Mecanum wheeled robots.
|
||||
*
|
||||
* <p>This is an alias to mecanumDrive_Polar() for backward compatability
|
||||
* <p>This is an alias to mecanumDrive_Polar() for backward compatibility
|
||||
*
|
||||
* @param magnitude The speed that the robot should drive in a given direction. [-1.0..1.0]
|
||||
* @param direction The direction the robot should drive. The direction and maginitute are
|
||||
|
||||
@@ -21,7 +21,7 @@ import static java.util.Objects.requireNonNull;
|
||||
* round-trip time of a ping generated by the controller. These sensors use two transducers, a
|
||||
* speaker and a microphone both tuned to the ultrasonic range. A common ultrasonic sensor, the
|
||||
* Daventech SRF04 requires a short pulse to be generated on a digital channel. This causes the
|
||||
* chirp to be emmitted. A second line becomes high as the ping is transmitted and goes low when the
|
||||
* chirp to be emitted. A second line becomes high as the ping is transmitted and goes low when the
|
||||
* echo is received. The time that the line is high determines the round trip distance (time of
|
||||
* flight).
|
||||
*/
|
||||
@@ -238,7 +238,7 @@ public class Ultrasonic extends SensorBase implements PIDSource, LiveWindowSenda
|
||||
* @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 preffered, it can be implemented by pinging the sensors manually and waiting
|
||||
* is preferred, it can be implemented by pinging the sensors manually and waiting
|
||||
* for the results to come back.
|
||||
*/
|
||||
public void setAutomaticMode(boolean enabling) {
|
||||
|
||||
@@ -14,7 +14,7 @@ import edu.wpi.first.wpilibj.hal.HAL;
|
||||
* Handle input from Xbox 360 or Xbox One controllers connected to the Driver Station.
|
||||
*
|
||||
* <p>This class handles Xbox input that comes from the Driver Station. Each time a value is
|
||||
* requested the most recent value is returend. There is a single class instance for each controller
|
||||
* requested the most recent value is returned. There is a single class instance for each controller
|
||||
* and the mapping of ports to hardware buttons depends on the code in the Driver Station.
|
||||
*/
|
||||
public class XboxController extends GamepadBase {
|
||||
|
||||
@@ -18,7 +18,7 @@ public class I2CJNI extends JNIWrapper {
|
||||
|
||||
public static native int i2CWrite(int port, byte address, ByteBuffer dataToSend, byte sendSize);
|
||||
|
||||
public static native int i2CRead(int port, byte address, ByteBuffer dataRecieved,
|
||||
public static native int i2CRead(int port, byte address, ByteBuffer dataReceived,
|
||||
byte receiveSize);
|
||||
|
||||
public static native void i2CClose(int port);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Classes in the {@code edu.wpi.first.wpilibj.vision} package are designed to
|
||||
* simplify using OpenCV vision processing code from a robot program.
|
||||
*
|
||||
* An example usecase for grabbing a yellow tote from 2015 in autonomous:
|
||||
* <p>An example use case for grabbing a yellow tote from 2015 in autonomous:
|
||||
* <br>
|
||||
* <pre><code>
|
||||
* public class Robot extends IterativeRobot
|
||||
|
||||
Reference in New Issue
Block a user