Implements a quadrature encoder using ESP32's super cool hardware counters (yeah!). Based on the ESP32Encoder library by Kevin Harrington (madhephaestus).
More...
|
double | getCount () |
| Returns current incremental position. Angular type encoders, which start counting at 0 after a full turn, need to keep book of full turns internally and compute the incremental count accordingly.
|
|
void | setCount (double count) |
| set count of current encoder position More...
|
|
void | clearCount () |
| set count of current encoder position to 0
|
|
void | pauseCount () |
| Ignore any pulses until resumeCount() is called.
|
|
void | resumeCount () |
| Resume counting, after having it stopped by pauseCount()
|
|
double | getTicksPerRevolution () |
| ...
|
|
void | init (double t, uint8_t a, uint8_t b, encType type) |
| attach ESP32Encoder to pins and clear position to 0 More...
|
|
void | setFilter (double value) |
| Set filter to smoothen faulty or jittery absolute readings. More...
|
|
double | getFilteredCount () |
| Returns current position count with filter setting applied. More...
|
|
virtual void | update () |
| (abstract) Can be overridden by QPID subsystems which need to do their own polling. Will be called by QPID_Unit::update() for subsystems, and by firmware/client for QPID_Unit itself.
|
|
void | throwError (const char *invokedBy, const char *errorMessage) |
| Writes error message and error invoking class to Serial. More...
|
|
void | log (const char *logEntry) |
| Puts timestamped string into the system log (atm: writes it out to Serial). More...
|
|
|
bool | processMessage (uint8_t *m) override |
| (abstract) Interprets message handed down from QPID_Unit locally. Must be overridden in derived classes
|
|
| QPID_Object () |
| Constructor. Begins Serial with 115200 baud for logging and error reporting, if not done previously.
|
|
|
double | ticksPerRevolution |
|
double | filter = 0 |
|
double | lastCount = 0 |
|
Implements a quadrature encoder using ESP32's super cool hardware counters (yeah!). Based on the ESP32Encoder library by Kevin Harrington (madhephaestus).
QPID_Encoder)
- Todo:
- check private, protected etc. for all derived classes
◆ setCount()
void QPID_Encoder_ESP32::setCount |
( |
double |
count | ) |
|
|
virtual |
set count of current encoder position
- Parameters
-
Reimplemented from QPID_Encoder.
The documentation for this class was generated from the following files: