added setPulses()

Fork of QEI by Aaron Berk

Files at this revision

API Documentation at this revision

Comitter:
Vigilance88
Date:
Thu Oct 22 23:19:33 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	Thu Oct 22 23:19:33 2015 +0000
@@ -173,6 +173,13 @@
 
 }
 
+void QEI::setPulses(int p) {
+ 
+    pulses_      = p;
+    revolutions_ = 0;
+ 
+}
+
 int QEI::getCurrentState(void) {
 
     return currState_;
--- a/QEI.h	Thu Sep 02 16:48:55 2010 +0000
+++ b/QEI.h	Thu Oct 22 23:19:33 2015 +0000
@@ -185,6 +185,8 @@
      */
     void reset(void);
 
+    void setPulses(int p);
+
     /**
      * Read the state of the encoder.
      *