amidoinitrite

Fork of AVEncoder by Aravind Vadali

Files at this revision

API Documentation at this revision

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
--- 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;
 }
 
--- 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();