Quadrature encoder interface library. - added setPulses()

Fork of QEI by Aaron Berk

Files at this revision

API Documentation at this revision

Comitter:
Vigilance88
Date:
Sun Oct 18 23:24:11 2015 +0000
Parent:
0:5c2ad81551aa
Commit message:
added setPulses()

Changed in this revision

QEI.cpp Show annotated file Show diff for this revision Revisions of this file
QEI.h Show annotated file Show diff for this revision Revisions of this file
diff -r 5c2ad81551aa -r 13000c44d4ea QEI.cpp
--- a/QEI.cpp	Thu Sep 02 16:48:55 2010 +0000
+++ b/QEI.cpp	Sun Oct 18 23:24:11 2015 +0000
@@ -173,6 +173,13 @@
 
 }
 
+void QEI::setPulses(int pulses) {
+ 
+    pulses_      = pulses;
+    revolutions_ = 0;
+ 
+}
+
 int QEI::getCurrentState(void) {
 
     return currState_;
diff -r 5c2ad81551aa -r 13000c44d4ea QEI.h
--- a/QEI.h	Thu Sep 02 16:48:55 2010 +0000
+++ b/QEI.h	Sun Oct 18 23:24:11 2015 +0000
@@ -192,6 +192,9 @@
      *         bit 1 = The reading from channel B
      *         bit 2 = The reading from channel A
      */
+    
+    void setPulses(int pulses);
+    
     int getCurrentState(void);
 
     /**