mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Add encoder indexing support in C++
Java will be done tonight or tomorrow Change-Id: I3a3287a197b6f071c261172eb8ec930693e8b3c7
This commit is contained in:
@@ -29,6 +29,7 @@ class DigitalSource;
|
||||
class Encoder : public SensorBase, public CounterBase, public PIDSource, public LiveWindowSendable
|
||||
{
|
||||
public:
|
||||
enum IndexingType { kResetWhileHigh, kResetWhileLow, kResetOnFallingEdge, kResetOnRisingEdge };
|
||||
|
||||
Encoder(uint32_t aChannel, uint32_t bChannel, bool reverseDirection = false,
|
||||
EncodingType encodingType = k4X);
|
||||
@@ -57,6 +58,10 @@ public:
|
||||
void SetPIDSourceParameter(PIDSourceParameter pidSource);
|
||||
double PIDGet();
|
||||
|
||||
void SetIndexSource(uint32_t channel, IndexingType type = kResetOnRisingEdge);
|
||||
void SetIndexSource(DigitalSource *source, IndexingType type = kResetOnRisingEdge);
|
||||
void SetIndexSource(DigitalSource &source, IndexingType type = kResetOnRisingEdge);
|
||||
|
||||
void UpdateTable();
|
||||
void StartLiveWindowMode();
|
||||
void StopLiveWindowMode();
|
||||
|
||||
Reference in New Issue
Block a user