7 #ifndef QUAD_ENCODER_H_
8 #define QUAD_ENCODER_H_
10 #include "ChipObject.h"
11 #include "CounterBase.h"
12 #include "SensorBase.h"
14 #include "PIDSource.h"
15 #include "LiveWindow/LiveWindowSendable.h"
32 Encoder(uint32_t aChannel, uint32_t bChannel,
bool reverseDirection=
false, EncodingType encodingType = k4X);
33 Encoder(uint8_t aModuleNumber, uint32_t aChannel, uint8_t bModuleNumber, uint32_t _bChannel,
bool reverseDirection=
false, EncodingType encodingType = k4X);
59 void StartLiveWindowMode();
60 void StopLiveWindowMode();
61 std::string GetSmartDashboardType();
62 void InitTable(ITable *subTable);
66 void InitEncoder(
bool _reverseDirection, EncodingType encodingType);
67 double DecodingScaleFactor();
71 bool m_allocatedASource;
72 bool m_allocatedBSource;
75 double m_distancePerPulse;
77 EncodingType m_encodingType;
78 PIDSourceParameter m_pidSource;
double GetRate()
Definition: Encoder.cpp:437
bool GetStopped()
Definition: Encoder.cpp:365
Definition: DigitalSource.h:19
int GetSamplesToAverage()
Definition: Encoder.cpp:524
void SetReverseDirection(bool reverseDirection)
Definition: Encoder.cpp:477
void Reset()
Definition: Encoder.cpp:279
void SetSamplesToAverage(int samplesToAverage)
Definition: Encoder.cpp:499
void SetDistancePerPulse(double distancePerPulse)
Definition: Encoder.cpp:465
void SetMinRate(double minRate)
Definition: Encoder.cpp:448
virtual ~Encoder()
Definition: Encoder.cpp:193
Definition: CounterBase.h:15
Definition: SensorBase.h:20
int32_t GetRaw()
Definition: Encoder.cpp:247
void SetPIDSourceParameter(PIDSourceParameter pidSource)
Definition: Encoder.cpp:548
void SetMaxPeriod(double maxPeriod)
Definition: Encoder.cpp:343
void Stop()
Definition: Encoder.cpp:228
void Start()
Definition: Encoder.cpp:212
Definition: PIDSource.h:15
double GetDistance()
Definition: Encoder.cpp:425
double PIDGet()
Definition: Encoder.cpp:559
bool GetDirection()
Definition: Encoder.cpp:385
int32_t Get()
Definition: Encoder.cpp:269
double GetPeriod()
Definition: Encoder.cpp:301