0xPIT / encoder

Atmel AVR C++ RotaryEncoder Implementation
309 stars 162 forks source link

Issue with table based encoders #26

Open B-Thomas opened 6 years ago

B-Thomas commented 6 years ago

In line 92 of ClickEncoder.cpp the value of the lookup table (+1 / 0 / -1) is stored in a uint8_t datatype, instead it should be stored in an int8_t type according to the possible values.

uint8_t tbl = pgm_read_byte(&table[last]); if (tbl) { Serial.println(tbl); delta += tbl; moved = true; }

soligen2010 commented 6 years ago

Just FYI, this fix as well as other bug fixes and enhancements are in my fork of this library.