PullUpMode

Fork of QEI by Kazu Zamasu

Files at this revision

API Documentation at this revision

Comitter:
Hapi_Tech
Date:
Fri Jul 03 11:50:48 2015 +0000
Parent:
1:e13e5767d46e
Commit message:
PreHeater firmware

Changed in this revision

QEI.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r e13e5767d46e -r 923493dc260c QEI.cpp
--- a/QEI.cpp	Fri Jul 03 11:42:13 2015 +0000
+++ b/QEI.cpp	Fri Jul 03 11:50:48 2015 +0000
@@ -143,7 +143,8 @@
     //Workout what the current state is.
     int chanA = channelA_.read();
     int chanB = channelB_.read();
-
+    channelA_.mode(PullUp);
+    channelB_.mode(PullUp);
     //2-bit state.
     currState_ = (chanA << 1) | (chanB);
     prevState_ = currState_;