Rotary encoder library.

Dependents:   RotaryEncoder_TestProgram ST7735_Pong accuBlast_display

Files at this revision

API Documentation at this revision

Comitter:
shintamainjp
Date:
Sun Dec 19 05:11:09 2010 +0000
Parent:
0:6537b3b709b6
Commit message:

Changed in this revision

RotaryEncoder.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6537b3b709b6 -r 8000eddbf4aa RotaryEncoder.cpp
--- a/RotaryEncoder.cpp	Sun Dec 19 05:03:45 2010 +0000
+++ b/RotaryEncoder.cpp	Sun Dec 19 05:11:09 2010 +0000
@@ -56,7 +56,7 @@
 
     code = (code << 2) + (((pin1.read() << 1) | (pin2.read() << 0)) & 3);
     code &= 15;
-    switch (i) {
+    switch (code) {
         case 0x7:
             if (min < val) {
                 val--;