From: Keith Packard Date: Fri, 9 May 2014 07:05:39 +0000 (-0700) Subject: altos: Simplify quadrature tracking X-Git-Tag: 1.3.2.2~116 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=8d9c79f5c162e07d57d42c6ba5825a3327a911d5;hp=8d9c79f5c162e07d57d42c6ba5825a3327a911d5 altos: Simplify quadrature tracking 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 ---