added setPulses()
Fork of QEI by
Revision 1:378b29004b9a, committed 2015-10-22
- 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 |
diff -r 5c2ad81551aa -r 378b29004b9a QEI.cpp --- 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_;
diff -r 5c2ad81551aa -r 378b29004b9a QEI.h --- 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. *