altos: Simplify quadrature tracking
authorKeith Packard <keithp@keithp.com>
Fri, 9 May 2014 07:05:39 +0000 (00:05 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 9 May 2014 07:05:39 +0000 (00:05 -0700)
Set the timer to 200Hz for a 5ms debounce interval. Then, simply look
for transitions ending in both bits in the encoder being off, which
indicates the the encoder is resting in a detent. If bit '2' is
turning off, the encoder was rotated clockwise, otherwise the encoder
was rotated counter clockwise.

This is a lot more reliable, although still not perfect.

Signed-off-by: Keith Packard <keithp@keithp.com>

No differences found