[wpilib] Improve new counter classes documentation (NFC) (#3801)

This commit is contained in:
sciencewhiz
2021-12-18 21:40:03 -08:00
committed by GitHub
parent dc531462e1
commit c46636f218
6 changed files with 42 additions and 9 deletions

View File

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

View File

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

View File

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