![]() |
WPILibC++ 2027.0.0-alpha-4
|
Interface for counting the number of ticks on a digital input channel. More...
#include <wpi/hardware/discrete/CounterBase.hpp>
Public Types | |
| enum | EncodingType { k1X , k2X , k4X } |
Public Member Functions | |
| CounterBase ()=default | |
| virtual | ~CounterBase ()=default |
| CounterBase (CounterBase &&)=default | |
| CounterBase & | operator= (CounterBase &&)=default |
| virtual int | Get () const =0 |
| virtual void | Reset ()=0 |
| virtual wpi::units::second_t | GetPeriod () const =0 |
| virtual void | SetMaxPeriod (wpi::units::second_t maxPeriod)=0 |
| virtual bool | GetStopped () const =0 |
| virtual bool | GetDirection () const =0 |
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.
All counters will immediately start counting - Reset() them if you need them to be zeroed before use.
|
default |
|
virtualdefault |
|
default |
|
pure virtual |
Implemented in wpi::Encoder.
|
pure virtual |
Implemented in wpi::Encoder.
|
pure virtual |
Implemented in wpi::Encoder.
|
pure virtual |
Implemented in wpi::Encoder.
|
default |
|
pure virtual |
Implemented in wpi::Encoder.
|
pure virtual |
Implemented in wpi::Encoder.