mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpilib] Improve new counter classes documentation (NFC) (#3801)
This commit is contained in:
@@ -15,7 +15,12 @@
|
||||
namespace frc {
|
||||
class DigitalSource;
|
||||
|
||||
/** Counter using external direction. */
|
||||
/** Counter using external direction.
|
||||
*
|
||||
* <p>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<ExternalDirectionCounter> {
|
||||
@@ -51,7 +56,7 @@ class ExternalDirectionCounter
|
||||
int GetCount() const;
|
||||
|
||||
/**
|
||||
* Sets to revert the counter direction.
|
||||
* Sets to reverse the counter direction.
|
||||
*
|
||||
* @param reverseDirection True to reverse counting direction.
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,12 @@ class DigitalSource;
|
||||
|
||||
/**
|
||||
* Tachometer for getting rotational speed from a device.
|
||||
*
|
||||
* <p>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<Tachometer> {
|
||||
|
||||
@@ -15,7 +15,12 @@
|
||||
namespace frc {
|
||||
class DigitalSource;
|
||||
|
||||
/** 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.
|
||||
*
|
||||
*/
|
||||
class UpDownCounter : public wpi::Sendable,
|
||||
public wpi::SendableHelper<UpDownCounter> {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user