diff --git a/wpilibc/src/main/native/include/frc/counter/ExternalDirectionCounter.h b/wpilibc/src/main/native/include/frc/counter/ExternalDirectionCounter.h index 3591fa26b0..4d9faf2101 100644 --- a/wpilibc/src/main/native/include/frc/counter/ExternalDirectionCounter.h +++ b/wpilibc/src/main/native/include/frc/counter/ExternalDirectionCounter.h @@ -15,7 +15,12 @@ namespace frc { class DigitalSource; -/** Counter using external direction. */ +/** Counter using external direction. + * + *
This counts on an edge from one digital input and the whether it counts
+ * up or down based on the state of a second digital input.
+ *
+ */
class ExternalDirectionCounter
: public wpi::Sendable,
public wpi::SendableHelper The Tachometer class measures the time between digital pulses to
+ * determine the rotation speed of a mechanism. Examples of devices that could
+ * be used with the tachometer class are a hall effect sensor, break beam
+ * sensor, or optical sensor detecting tape on a shooter wheel. Unlike
+ * encoders, this class only needs a single digital input.
*/
class Tachometer : public wpi::Sendable,
public wpi::SendableHelper This counts on an edge from one digital input and the whether it counts up or down based on
+ * the state of a second digital input.
+ */
public class ExternalDirectionCounter implements Sendable, AutoCloseable {
private final DigitalSource m_countSource;
private final DigitalSource m_directionSource;
@@ -67,7 +72,7 @@ public class ExternalDirectionCounter implements Sendable, AutoCloseable {
}
/**
- * Sets to revert the counter direction.
+ * Sets to revese the counter direction.
*
* @param reverseDirection True to reverse counting direction.
*/
diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/Tachometer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/Tachometer.java
index 037b28ecd0..834c153bd7 100644
--- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/Tachometer.java
+++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/Tachometer.java
@@ -16,7 +16,14 @@ import edu.wpi.first.wpilibj.DigitalSource;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
-/** Tachometer. */
+/**
+ * Tachometer.
+ *
+ * The Tachometer class measures the time between digital pulses to determine the rotation speed
+ * of a mechanism. Examples of devices that could be used with the tachometer class are a hall
+ * effect sensor, break beam sensor, or optical sensor detecting tape on a shooter wheel. Unlike
+ * encoders, this class only needs a single digital input.
+ */
public class Tachometer implements Sendable, AutoCloseable {
private final DigitalSource m_source;
private final int m_handle;
@@ -25,7 +32,7 @@ public class Tachometer implements Sendable, AutoCloseable {
/**
* Constructs a new tachometer.
*
- * @param source The source.
+ * @param source The DigitalSource (e.g. DigitalInput) of the Tachometer.
*/
public Tachometer(DigitalSource source) {
m_source = requireNonNullParam(source, "source", "Tachometer");
diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/UpDownCounter.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/UpDownCounter.java
index 0d3e341136..81d504e032 100644
--- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/UpDownCounter.java
+++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/counter/UpDownCounter.java
@@ -14,7 +14,12 @@ import edu.wpi.first.wpilibj.DigitalSource;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
-/** Up Down Counter. */
+/**
+ * Up Down Counter.
+ *
+ * This class can count edges on a single digital input or count up based on an edge from one
+ * digital input and down on an edge from another digital input.
+ */
public class UpDownCounter implements Sendable, AutoCloseable {
private DigitalSource m_upSource;
private DigitalSource m_downSource;
@@ -88,7 +93,7 @@ public class UpDownCounter implements Sendable, AutoCloseable {
}
/**
- * Sets to revert the counter direction.
+ * Sets to reverse the counter direction.
*
* @param reverseDirection True to reverse counting direction.
*/