Diff: counter.cpp
- Revision:
- 1:8c1bace3af7b
- Parent:
- 0:f4c92b67e7be
- Child:
- 2:fa04a99dcdab
diff -r f4c92b67e7be -r 8c1bace3af7b counter.cpp --- a/counter.cpp Fri Nov 25 13:51:58 2011 +0000 +++ b/counter.cpp Fri Nov 25 14:03:51 2011 +0000 @@ -1,13 +1,13 @@ /* + * Based on Aaron Berk's library for a QEI (http://mbed.org/users/aberk/libraries/QEI/le4bkf), this mainly involved deleting most of the functionality + * * Includes */ #include "counter.h" -counter::counter(PinName channelA, - int pulsesPerRev) : channelA_(channelA){ +counter::counter(PinName channelA) : channelA_(channelA){ pulses_ = 0; - pulsesPerRev_ = pulsesPerRev; channelA_.rise(this, &counter::encode); } @@ -15,8 +15,7 @@ void counter::reset(void) { pulses_ = 0; - revolutions_ = 0; - + } int counter::getPulses(void) { @@ -25,12 +24,6 @@ } -int counter::getRevolutions(void) { - - return revolutions_; - -} - void counter::encode(void) { pulses_++;