Class mRotaryEncoder for mechanical incremental rotary encoders with pushbuttons. Use debouncing and callback-functions for rotation and pressing of button. This version is for old mbed. New version for mbed-os see https://os.mbed.com/users/charly/code/mRotaryEncoder-os/

Dependencies:   PinDetect

Dependents:   SimplePIDBot FinalProgram VS1053Player SPK-DVIMXR ... more

Files at this revision

API Documentation at this revision

Comitter:
charly
Date:
Fri Feb 26 20:18:57 2016 +0000
Parent:
9:36f7abb289c6
Child:
11:24b34deae975
Commit message:
bugfix

Changed in this revision

mRotaryEncoder.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/mRotaryEncoder.cpp	Sun Dec 20 21:37:35 2015 +0000
+++ b/mRotaryEncoder.cpp	Fri Feb 26 20:18:57 2016 +0000
@@ -57,8 +57,8 @@
             m_position--;
             rotCCWIsr.call();
         }
+    rotIsr.call();                        // call the isr for rotation
     }
-    rotIsr.call();                        // call the isr for rotation
 }
 
 void mRotaryEncoder::rise(void) {
@@ -72,7 +72,7 @@
             m_position++;
             rotCWIsr.call();
         }
+    rotIsr.call();                        // call the isr for rotation
     }
-    rotIsr.call();                        // call the isr for rotation
 }