amidoinitrite
Fork of AVEncoder by
Revision 1:e0e5901955cd, committed 2015-11-18
- Comitter:
- intgsull
- Date:
- Wed Nov 18 06:48:47 2015 +0000
- Parent:
- 0:a32ab75adcad
- Commit message:
- Tryin to get irPID to work
Changed in this revision
AVEncoder.cpp | Show annotated file Show diff for this revision Revisions of this file |
AVEncoder.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r a32ab75adcad -r e0e5901955cd AVEncoder.cpp --- a/AVEncoder.cpp Tue Nov 03 06:12:30 2015 +0000 +++ b/AVEncoder.cpp Wed Nov 18 06:48:47 2015 +0000 @@ -45,7 +45,7 @@ m_pulses = 0; } -unsigned long int AVEncoder::getPulses() { +long int AVEncoder::getPulses() { return m_pulses; }
diff -r a32ab75adcad -r e0e5901955cd AVEncoder.h --- a/AVEncoder.h Tue Nov 03 06:12:30 2015 +0000 +++ b/AVEncoder.h Wed Nov 18 06:48:47 2015 +0000 @@ -42,10 +42,10 @@ public: AVEncoder(PinName channelA, PinName channelB); - unsigned long int getPulses(); + long int getPulses(); void reset(); private: - unsigned long int m_pulses; + volatile long int m_pulses; InterruptIn chanA; InterruptIn chanB; void incrementCount();