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
--- 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_;
--- 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);
 
     /**